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/buildtool/common/location.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/buildtool/common/location.cpp') diff --git a/src/buildtool/common/location.cpp b/src/buildtool/common/location.cpp index 597fc286..7f124566 100644 --- a/src/buildtool/common/location.cpp +++ b/src/buildtool/common/location.cpp @@ -48,8 +48,6 @@ auto ReadLocationObject(nlohmann::json const& location, root_path = FileSystemManager::GetCurrentDirectory().root_path(); } return std::optional{ - std::make_pair(std::filesystem::weakly_canonical( - std::filesystem::absolute(root_path / path)), - std::filesystem::weakly_canonical( - std::filesystem::absolute(root_path / base)))}; + std::make_pair(std::filesystem::weakly_canonical(root_path / path), + std::filesystem::weakly_canonical(root_path / base))}; } -- cgit v1.2.3