aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/dataloader/Vic2PathSearch.cpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2024-07-19 21:35:31 +0200
committer GitHub <noreply@github.com>2024-07-19 21:35:31 +0200
commitd1f3a96b72dd06b5f97dd4643e5f016a02b42ea6 (patch)
tree38015e5729afbb98cf520e2cf26d8a4623d32f2f /src/openvic-simulation/dataloader/Vic2PathSearch.cpp
parente0518bee9b4c164f40716a8033b5e207c2060c0b (diff)
parent03647d2249f72b6545628bb844685f87c4581062 (diff)
Merge pull request #176 from OpenVicProject/format-cleanup
Cleanup: inheritance, const movable variables, code formatting
Diffstat (limited to 'src/openvic-simulation/dataloader/Vic2PathSearch.cpp')
-rw-r--r--src/openvic-simulation/dataloader/Vic2PathSearch.cpp6
1 files changed, 3 insertions, 3 deletions
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<typename T>
concept is_filename = std::same_as<T, std::filesystem::path> || std::convertible_to<T, std::string_view>;
-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::decay_t<decltype(lhs)>, 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<max_amount_of_steam_libraries>();
- 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);
}
};