diff --git a/include/fc/filesystem.hpp b/include/fc/filesystem.hpp index 95074eb..71c04eb 100644 --- a/include/fc/filesystem.hpp +++ b/include/fc/filesystem.hpp @@ -63,7 +63,7 @@ namespace fc { It is needed since not all parts of fc library accept unicode paths (fc::file_mapping). */ - std::string toNativeAnsiPath() const; + std::string to_native_ansi_path() const; /** * @brief replaces '/' with '\' in the result of generic_string() diff --git a/src/filesystem.cpp b/src/filesystem.cpp index baf52d0..de160f6 100644 --- a/src/filesystem.cpp +++ b/src/filesystem.cpp @@ -17,12 +17,12 @@ namespace fc { void to_variant( const fc::path& t, variant& v ) { - std::string path = t.toNativeAnsiPath(); + std::string path = t.to_native_ansi_path(); for(auto& c : path) - { + { if(c == '\\') c = '/'; - } + } v = path; } @@ -96,16 +96,16 @@ namespace fc { return _p->generic_wstring(); } - std::string path::toNativeAnsiPath() const + std::string path::to_native_ansi_path() const { std::wstring path = generic_wstring(); #ifdef WIN32 const size_t maxPath = 32*1024; - std::vector shortPath; - shortPath.resize(maxPath + 1); + std::vector short_path; + short_path.resize(maxPath + 1); - wchar_t* buffer = shortPath.data(); + wchar_t* buffer = short_path.data(); DWORD res = GetShortPathNameW(path.c_str(), buffer, maxPath); if(res != 0) path = buffer; diff --git a/src/interprocess/mmap_struct.cpp b/src/interprocess/mmap_struct.cpp index 7049317..5df0009 100644 --- a/src/interprocess/mmap_struct.cpp +++ b/src/interprocess/mmap_struct.cpp @@ -33,7 +33,7 @@ namespace fc } } - std::string filePath = file.toNativeAnsiPath(); + std::string filePath = file.to_native_ansi_path(); _file_mapping.reset( new fc::file_mapping( filePath.c_str(), fc::read_write ) ); _mapped_region.reset( new fc::mapped_region( *_file_mapping, fc::read_write, 0, s ) );