Skip to content

Commit

Permalink
refs #44, warnings on Xcode 11.3
Browse files Browse the repository at this point in the history
  • Loading branch information
gulrak committed Dec 21, 2019
1 parent f5bfb98 commit c96bc30
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/ghc/filesystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -3558,7 +3558,7 @@ GHC_INLINE path current_path(std::error_code& ec)
#else
size_t pathlen = static_cast<size_t>(std::max(int(::pathconf(".", _PC_PATH_MAX)), int(PATH_MAX)));
std::unique_ptr<char[]> buffer(new char[pathlen + 1]);
if (::getcwd(buffer.get(), pathlen) == NULL) {
if (::getcwd(buffer.get(), pathlen) == nullptr) {
ec = detail::make_system_error();
return path();
}
Expand Down

0 comments on commit c96bc30

Please sign in to comment.