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:22:38 +0200 |
commit | d4ade6b45f3144821d846b51429815d6f8915c97 (patch) | |
tree | 407d2c7a1a8f480e968c29a97bcae347b2db70e1 /dep/cppformat/posix.cc | |
parent | 585f978c58648b4da5f55e437719ce2ed6354fe0 (diff) |
Dep/CppFormat: Update cppformat to cppformat/cppformat@7859f8123311c1b8f698
* clean up our custom CMakeList.txt
(cherry picked from commit 93d1028d75ee4847ebcaa075f56a4d9e7632c33a)
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(); |