diff options
author | Naios <naios-dev@live.de> | 2015-07-01 21:06:59 +0200 |
---|---|---|
committer | Naios <naios-dev@live.de> | 2015-07-01 21:18:38 +0200 |
commit | 93d1028d75ee4847ebcaa075f56a4d9e7632c33a (patch) | |
tree | 3773d084a7d16324d32b175f75cf4a8c5b6f1a98 /dep/cppformat/posix.cc | |
parent | 55681666b3cc0e33eeb5cdb77e638e68c19f452c (diff) |
Dep/CppFormat: Update cppformat to cppformat/cppformat@7859f8123311c1b8f698
* clean up our custom CMakeList.txt
Diffstat (limited to 'dep/cppformat/posix.cc')
-rw-r--r-- | dep/cppformat/posix.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/dep/cppformat/posix.cc b/dep/cppformat/posix.cc index 0efb5aff3d0..d36871f43a3 100644 --- a/dep/cppformat/posix.cc +++ b/dep/cppformat/posix.cc @@ -83,7 +83,8 @@ fmt::BufferedFile::~BufferedFile() FMT_NOEXCEPT { fmt::report_system_error(errno, "cannot close file"); } -fmt::BufferedFile::BufferedFile(fmt::StringRef filename, fmt::StringRef mode) { +fmt::BufferedFile::BufferedFile( + fmt::CStringRef filename, fmt::CStringRef mode) { FMT_RETRY_VAL(file_, FMT_SYSTEM(fopen(filename.c_str(), mode.c_str())), 0); if (!file_) throw SystemError(errno, "cannot open file {}", filename); @@ -108,7 +109,7 @@ int fmt::BufferedFile::fileno() const { return fd; } -fmt::File::File(fmt::StringRef path, int oflag) { +fmt::File::File(fmt::CStringRef path, int oflag) { int mode = S_IRUSR | S_IWUSR; #if defined(_WIN32) && !defined(__MINGW32__) fd_ = -1; @@ -151,8 +152,8 @@ fmt::LongLong fmt::File::size() const { if (error != NO_ERROR) throw WindowsError(GetLastError(), "cannot get file size"); } - fmt::ULongLong size = size_upper; - return (size << sizeof(DWORD) * CHAR_BIT) | size_lower; + fmt::ULongLong long_size = size_upper; + return (long_size << sizeof(DWORD) * CHAR_BIT) | size_lower; #else typedef struct stat Stat; Stat file_stat = Stat(); |