mirror of
https://github.com/fmtlib/fmt.git
synced 2026-02-16 23:29:57 +08:00
Fix Windows compilation with -fno-exceptions (#405)
(cherry picked from commit 15d0f327735b8fd2169c72ef923280e7e9d4978c)
This commit is contained in:
parent
2baf2a5e2c
commit
63639cba98
@ -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;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user