io: return path object from path_error accessor

This commit is contained in:
Danny Robson 2016-10-08 17:28:06 +11:00
parent c711d7e0f5
commit e80c3c959c
2 changed files with 3 additions and 3 deletions

4
io.cpp
View File

@ -200,8 +200,8 @@ path_error::path_error (const std::experimental::filesystem::path &_path):
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
const char* const std::experimental::filesystem::path&
path_error::path (void) const noexcept path_error::path (void) const noexcept
{ {
return m_path.string ().c_str (); return m_path;
} }

2
io.hpp
View File

@ -105,7 +105,7 @@ namespace util {
public: public:
path_error (const std::experimental::filesystem::path &path); path_error (const std::experimental::filesystem::path &path);
const char* path (void) const noexcept; const std::experimental::filesystem::path& path (void) const noexcept;
private: private:
const std::experimental::filesystem::path m_path; const std::experimental::filesystem::path m_path;