From 4944a87e18c1b2d7d2b257156b51576db359f0e4 Mon Sep 17 00:00:00 2001 From: Steffen Schuemann Date: Sun, 31 Jan 2021 13:04:14 +0100 Subject: [PATCH] refs #90, additional compile issue fixes --- include/ghc/filesystem.hpp | 4 ++-- test/filesystem_test.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/ghc/filesystem.hpp b/include/ghc/filesystem.hpp index edfb917..ddf91d5 100644 --- a/include/ghc/filesystem.hpp +++ b/include/ghc/filesystem.hpp @@ -3008,9 +3008,9 @@ GHC_INLINE path::iterator::iterator() {} GHC_INLINE path::iterator::iterator(const path& p, const impl_string_type::const_iterator& pos) : _first(p._path.begin()) , _last(p._path.end()) - , _iter(pos) , _prefix(_first + p._prefixLength) - , _root(p.has_root_directory() ? _first + p._prefixLength + p.root_name_length() : _last) + , _root(p.has_root_directory() ? _first + static_cast(p._prefixLength + p.root_name_length()) : _last) + , _iter(pos) { updateCurrent(); } diff --git a/test/filesystem_test.cpp b/test/filesystem_test.cpp index 5fb009b..0a52771 100644 --- a/test/filesystem_test.cpp +++ b/test/filesystem_test.cpp @@ -2798,7 +2798,7 @@ TEST_CASE("Windows: path namespace handling", "[filesystem][path][fs.path.win.na {R"(\??\C:\Windows\notepad.exe)", R"(\??\C:\Windows\notepad.exe)", "\\??", "\\??\\", "/??,/,C:,Windows,notepad.exe"}, #else {R"(\\?\C:\Windows\notepad.exe)", R"(\\?\C:\Windows\notepad.exe)", "C:", "C:\\", "//?/,C:,/,Windows,notepad.exe"}, - {R"(\??\C:\Windows\notepad.exe)", R"(\??\C:\Windows\notepad.exe)", "C:", "C:\\", "/??/,C:,/,Windows,notepad.exe"}, + {R"(\??\C:\Windows\notepad.exe)", R"(\??\C:\Windows\notepad.exe)", "C:", "C:\\", "/?\?/,C:,/,Windows,notepad.exe"}, #endif {R"(\\.\C:\Windows\notepad.exe)", R"(\\.\C:\Windows\notepad.exe)", "\\\\.", "\\\\.\\", "//.,/,C:,Windows,notepad.exe"}, {R"(\\?\HarddiskVolume1\Windows\notepad.exe)", R"(\\?\HarddiskVolume1\Windows\notepad.exe)", "\\\\?", "\\\\?\\", "//?,/,HarddiskVolume1,Windows,notepad.exe"},