mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 16:35:45 +08:00
Fixed msvc warning C4800 in win_eventlog_sink
This commit is contained in:
parent
678a79c0be
commit
4d7308f26d
@ -241,12 +241,12 @@ protected:
|
||||
details::os::utf8_to_wstrbuf(string_view_t(formatted.data(), formatted.size()), buf);
|
||||
|
||||
LPCWSTR lp_wstr = buf.data();
|
||||
succeeded = ::ReportEventW(event_log_handle(), eventlog::get_event_type(msg), eventlog::get_event_category(msg), event_id_,
|
||||
current_user_sid_.as_sid(), 1, 0, &lp_wstr, nullptr);
|
||||
succeeded = static_cast<bool>(::ReportEventW(event_log_handle(), eventlog::get_event_type(msg), eventlog::get_event_category(msg), event_id_,
|
||||
current_user_sid_.as_sid(), 1, 0, &lp_wstr, nullptr));
|
||||
#else
|
||||
LPCSTR lp_str = formatted.data();
|
||||
succeeded = ::ReportEventA(event_log_handle(), eventlog::get_event_type(msg), eventlog::get_event_category(msg), event_id_,
|
||||
current_user_sid_.as_sid(), 1, 0, &lp_str, nullptr);
|
||||
succeeded = static_cast<bool>(::ReportEventA(event_log_handle(), eventlog::get_event_type(msg), eventlog::get_event_category(msg), event_id_,
|
||||
current_user_sid_.as_sid(), 1, 0, &lp_str, nullptr));
|
||||
#endif
|
||||
|
||||
if (!succeeded)
|
||||
|
Loading…
Reference in New Issue
Block a user