Fixed vc warning on x64 build

This commit is contained in:
Gabi Melman 2016-10-17 12:50:38 +03:00 committed by GitHub
parent f14d1c002b
commit 698783861c

View File

@ -54,7 +54,7 @@ public:
{
auto color = colors_[msg.level];
auto orig_attribs = set_console_attribs(color);
WriteConsoleA(out_handle_, msg.formatted.data(), msg.formatted.size(), nullptr, nullptr);
WriteConsoleA(out_handle_, msg.formatted.data(), static_cast<DWORD>(msg.formatted.size()), nullptr, nullptr);
SetConsoleTextAttribute(out_handle_, orig_attribs); //reset to orig colors
}
@ -113,4 +113,4 @@ typedef wincolor_stderr_sink<std::mutex> wincolor_stderr_sink_mt;
typedef wincolor_stderr_sink<details::null_mutex> wincolor_stderr_sink_st;
}
}
}