From a212d87be891c5146021b6442063ed39a4a1cd4a Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Tue, 22 Apr 2025 11:09:17 +0200 Subject: Remove redundant calls to std::filesystem::absolute ...when calling std::filesystem::weakly_canonical, since the latter converts the argument path to an absolute path internally. --- src/other_tools/ops_maps/critical_git_op_map.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/other_tools/ops_maps') diff --git a/src/other_tools/ops_maps/critical_git_op_map.hpp b/src/other_tools/ops_maps/critical_git_op_map.hpp index 3e5a07ee..1494e3b3 100644 --- a/src/other_tools/ops_maps/critical_git_op_map.hpp +++ b/src/other_tools/ops_maps/critical_git_op_map.hpp @@ -74,8 +74,8 @@ class CriticalGitOpGuard { std::scoped_lock const lock(critical_key_mutex_); // try emplace a new value - auto const canonical_path = std::filesystem::weakly_canonical( - std::filesystem::absolute(new_key.params.target_path)); + auto const canonical_path = + std::filesystem::weakly_canonical(new_key.params.target_path); auto result = curr_critical_key_.try_emplace(canonical_path, new_key); // If the insertion happens, there are no keys to wait for. std::nullopt // is returned. -- cgit v1.2.3