Update wincolor_sink-inl.h

This commit is contained in:
Gabi Melman 2019-07-18 01:37:55 +03:00 committed by GitHub
parent 38e5dbd866
commit 9f1b4fc9e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -150,7 +150,7 @@ void SPDLOG_INLINE wincolor_sink<ConsoleMutex>::write_to_file_(const fmt::memory
do
{
DWORD bytes_written = 0;
bool ok = WriteFile(out_handle_, formatted.data()+total_written, size-total_written, &bytes_written, nullptr) != 0;
bool ok = ::WriteFile(out_handle_, formatted.data()+total_written, size-total_written, &bytes_written, nullptr) != 0;
if (!ok || bytes_written == 0)
{
throw spdlog_ex("wincolor_sink: write_to_file_ failed. GetLastError(): " + std::to_string(::GetLastError()));
@ -172,4 +172,4 @@ SPDLOG_INLINE wincolor_stderr_sink<ConsoleMutex>::wincolor_stderr_sink(color_mod
{}
} // namespace sinks
} // namespace spdlog
} // namespace spdlog