mirror of
https://github.com/gabime/spdlog.git
synced 2025-03-31 10:22:41 +08:00
Remove redundant size check before calling WriteFile
This commit is contained in:
parent
dccb766095
commit
9799ecac6a
@ -146,11 +146,6 @@ void SPDLOG_INLINE wincolor_sink<ConsoleMutex>::write_to_file_(const memory_buf_
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto size = static_cast<DWORD>(formatted.size());
|
auto size = static_cast<DWORD>(formatted.size());
|
||||||
if (size == 0)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
DWORD bytes_written = 0;
|
DWORD bytes_written = 0;
|
||||||
bool ok = ::WriteFile(out_handle_, formatted.data(), size, &bytes_written, nullptr) != 0;
|
bool ok = ::WriteFile(out_handle_, formatted.data(), size, &bytes_written, nullptr) != 0;
|
||||||
if (!ok)
|
if (!ok)
|
||||||
|
Loading…
Reference in New Issue
Block a user