diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2018-05-04 16:49:07 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2018-05-04 16:49:07 -0700 |
| commit | 9265fe76bf3ed53db03eb31cad9be1c7594bfcb3 (patch) | |
| tree | 6e5090a272b587a32261c0b6a3986941d114d1b9 /toolsrc/src | |
| parent | 120f444af37f4b6e2cb4205b0ef5f8c6b97e8637 (diff) | |
| download | vcpkg-9265fe76bf3ed53db03eb31cad9be1c7594bfcb3.tar.gz vcpkg-9265fe76bf3ed53db03eb31cad9be1c7594bfcb3.zip | |
unix_root -> UNIX_ROOT static const
Diffstat (limited to 'toolsrc/src')
| -rw-r--r-- | toolsrc/src/vcpkg/base/files.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index 0542af1e7..3d96e834b 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -55,9 +55,9 @@ namespace vcpkg::Files virtual fs::path find_file_recursively_up(const fs::path& starting_dir, const std::string& filename) const override { + static const fs::path UNIX_ROOT = "/"; fs::path current_dir = starting_dir; - fs::path unix_root = "/"; - for (; !current_dir.empty() && current_dir != unix_root; current_dir = current_dir.parent_path()) + for (; !current_dir.empty() && current_dir != UNIX_ROOT; current_dir = current_dir.parent_path()) { const fs::path candidate = current_dir / filename; if (exists(candidate)) |
