Commit 15d0f327 authored by Jan Hellwig's avatar Jan Hellwig Committed by Jonathan Müller

Fix Windows compilation with -fno-exceptions (#405)

parent 8c63ea43
...@@ -135,7 +135,7 @@ fmt::LongLong fmt::File::size() const { ...@@ -135,7 +135,7 @@ fmt::LongLong fmt::File::size() const {
if (size_lower == INVALID_FILE_SIZE) { if (size_lower == INVALID_FILE_SIZE) {
DWORD error = GetLastError(); DWORD error = GetLastError();
if (error != NO_ERROR) if (error != NO_ERROR)
throw WindowsError(GetLastError(), "cannot get file size"); FMT_THROW(WindowsError(GetLastError(), "cannot get file size"));
} }
fmt::ULongLong long_size = size_upper; fmt::ULongLong long_size = size_upper;
return (long_size << sizeof(DWORD) * CHAR_BIT) | size_lower; return (long_size << sizeof(DWORD) * CHAR_BIT) | size_lower;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment