From 8d469770600ba16f87d91737b14581e857d9cef3 Mon Sep 17 00:00:00 2001 From: Shen-Ta Hsieh Date: Fri, 19 Nov 2021 09:58:29 +0800 Subject: [PATCH] Avoid c-style casting --- include/spdlog/sinks/stdout_sinks-inl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/spdlog/sinks/stdout_sinks-inl.h b/include/spdlog/sinks/stdout_sinks-inl.h index fd5594fe1..756734bf6 100644 --- a/include/spdlog/sinks/stdout_sinks-inl.h +++ b/include/spdlog/sinks/stdout_sinks-inl.h @@ -37,7 +37,7 @@ SPDLOG_INLINE stdout_sink_base::stdout_sink_base(FILE *file) #ifdef _WIN32 // get windows handle from the FILE* object - handle_ = (HANDLE)::_get_osfhandle(::_fileno(file_)); + handle_ = reinterpret_cast(::_get_osfhandle(::_fileno(file_))); // don't throw to support cases where no console is attached, // and let the log method to do nothing if (handle_ == INVALID_HANDLE_VALUE).