From 93d1028d75ee4847ebcaa075f56a4d9e7632c33a Mon Sep 17 00:00:00 2001 From: Naios Date: Wed, 1 Jul 2015 21:06:59 +0200 Subject: Dep/CppFormat: Update cppformat to cppformat/cppformat@7859f8123311c1b8f698 * clean up our custom CMakeList.txt --- dep/cppformat/posix.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'dep/cppformat/posix.cc') 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(); -- cgit v1.2.3