diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2025-04-22 11:09:17 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2025-04-22 13:50:57 +0200 |
commit | a212d87be891c5146021b6442063ed39a4a1cd4a (patch) | |
tree | 9df2902cf7f8bf9d70917ab87865517e9bdc71c3 /src/buildtool/common/location.cpp | |
parent | ba51f59519847a3d298fd176d93a0b6c64f452c1 (diff) | |
download | justbuild-a212d87be891c5146021b6442063ed39a4a1cd4a.tar.gz |
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.
Diffstat (limited to 'src/buildtool/common/location.cpp')
-rw-r--r-- | src/buildtool/common/location.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
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<location_res_t>{ - 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))}; } |