diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2020-07-23 14:52:39 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2020-09-06 08:34:17 (GMT) |
commit | 212e953d352c2ca20cf6280492633d21fbacdbc9 (patch) | |
tree | a004e3b7b094641b6cdde2485e883d4a68a3b90d /Utilities/std | |
parent | 46fbb75b2184a9910f49c97145506262726dda6b (diff) | |
download | CMake-212e953d352c2ca20cf6280492633d21fbacdbc9.zip CMake-212e953d352c2ca20cf6280492633d21fbacdbc9.tar.gz CMake-212e953d352c2ca20cf6280492633d21fbacdbc9.tar.bz2 |
cmCMakePath: Class for path handling
Diffstat (limited to 'Utilities/std')
-rw-r--r-- | Utilities/std/cm/bits/fs_path.cxx | 2 | ||||
-rw-r--r-- | Utilities/std/cm/filesystem | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Utilities/std/cm/bits/fs_path.cxx b/Utilities/std/cm/bits/fs_path.cxx index 8089998..1f52878 100644 --- a/Utilities/std/cm/bits/fs_path.cxx +++ b/Utilities/std/cm/bits/fs_path.cxx @@ -847,7 +847,7 @@ cm::string_view path::get_filename_fragment(filename_fragment fragment) const { auto file = this->get_filename(); - if (file == "." || file == ".." || file.empty()) { + if (file.empty() || file == "." || file == "..") { return fragment == filename_fragment::stem ? file : cm::string_view{}; } diff --git a/Utilities/std/cm/filesystem b/Utilities/std/cm/filesystem index cb05b22..6cbdea9 100644 --- a/Utilities/std/cm/filesystem +++ b/Utilities/std/cm/filesystem @@ -1150,6 +1150,8 @@ inline path::iterator path::end() const return iterator(this, true); } +// Non-member functions +// ==================== bool operator==(const path::iterator& lhs, const path::iterator& rhs); inline bool operator!=(const path::iterator& lhs, const path::iterator& rhs) @@ -1157,8 +1159,6 @@ inline bool operator!=(const path::iterator& lhs, const path::iterator& rhs) return !(lhs == rhs); } -// Non-member functions -// ==================== inline void swap(path& lhs, path& rhs) noexcept { lhs.swap(rhs); |