fix coding standard violations

This commit is contained in:
Daniel Larimer 2014-01-14 03:56:15 -05:00
parent d4e5d604a5
commit 7d81035e14
3 changed files with 9 additions and 9 deletions

View file

@ -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()

View file

@ -17,7 +17,7 @@
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 == '\\')
@ -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<wchar_t> shortPath;
shortPath.resize(maxPath + 1);
std::vector<wchar_t> 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;

View file

@ -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 ) );