From 03647d2249f72b6545628bb844685f87c4581062 Mon Sep 17 00:00:00 2001 From: hop311 Date: Fri, 19 Jul 2024 19:02:25 +0100 Subject: Cleanup: inheritance, const movable variables, code formatting --- src/openvic-simulation/dataloader/Vic2PathSearch.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/openvic-simulation/dataloader/Vic2PathSearch.cpp') diff --git a/src/openvic-simulation/dataloader/Vic2PathSearch.cpp b/src/openvic-simulation/dataloader/Vic2PathSearch.cpp index bc30b6e..ccd55d1 100644 --- a/src/openvic-simulation/dataloader/Vic2PathSearch.cpp +++ b/src/openvic-simulation/dataloader/Vic2PathSearch.cpp @@ -42,7 +42,7 @@ static constexpr bool path_equals(std::string_view lhs, std::string_view rhs) { template concept is_filename = std::same_as || std::convertible_to; -static bool filename_equals(const is_filename auto& lhs, const is_filename auto& rhs) { +static bool filename_equals(is_filename auto const& lhs, is_filename auto const& rhs) { auto left = [&lhs] { if constexpr (std::same_as, std::filesystem::path>) { return lhs.filename().string(); @@ -230,7 +230,7 @@ static fs::path _search_for_game_path(fs::path hint_path = {}) { // Array of strings contain "0" to std::to_string(max_amount_of_steam_libraries - 1) static constexpr auto library_indexes = OpenVic::ConstexprIntToStr::make_itosv_array(); - for (const auto& index : library_indexes) { + for (auto const& index : library_indexes) { decltype(current_node) node = std::nullopt; auto it = current_node.value().find(index); @@ -336,7 +336,7 @@ static fs::path _search_for_game_path(fs::path hint_path = {}) { fs::path Dataloader::search_for_game_path(fs::path hint_path) { struct fshash { - size_t operator()(const std::filesystem::path& p) const noexcept { + size_t operator()(std::filesystem::path const& p) const noexcept { return std::filesystem::hash_value(p); } }; -- cgit v1.2.3-56-ga3b1