From c96bc30a3f968b512880a36aa2c8c8f82266f830 Mon Sep 17 00:00:00 2001 From: Steffen Schuemann Date: Sat, 21 Dec 2019 12:38:57 +0100 Subject: [PATCH] refs #44, warnings on Xcode 11.3 --- include/ghc/filesystem.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/ghc/filesystem.hpp b/include/ghc/filesystem.hpp index 2265280..d1e8b54 100644 --- a/include/ghc/filesystem.hpp +++ b/include/ghc/filesystem.hpp @@ -2553,10 +2553,10 @@ GHC_INLINE path path::stem() const if (fn != "." && fn != "..") { impl_string_type::size_type n = fn.rfind('.'); if (n != impl_string_type::npos && n != 0) { - return fn.substr(0, n); + return path{fn.substr(0, n)}; } } - return fn; + return path{fn}; } GHC_INLINE path path::extension() const @@ -3558,7 +3558,7 @@ GHC_INLINE path current_path(std::error_code& ec) #else size_t pathlen = static_cast(std::max(int(::pathconf(".", _PC_PATH_MAX)), int(PATH_MAX))); std::unique_ptr buffer(new char[pathlen + 1]); - if (::getcwd(buffer.get(), pathlen) == NULL) { + if (::getcwd(buffer.get(), pathlen) == nullptr) { ec = detail::make_system_error(); return path(); }