Merge pull request #1164 from AMS21/patch-1

Fix use of old style cast in os-inl.h
This commit is contained in:
Gabi Melman 2019-07-22 17:11:14 -04:00 committed by GitHub
commit 1cdf09e9dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -122,7 +122,7 @@ SPDLOG_INLINE void prevent_child_fd(FILE *f)
#ifdef _WIN32
#if !defined(__cplusplus_winrt)
auto file_handle = (HANDLE)_get_osfhandle(_fileno(f));
auto file_handle = reinterpret_cast<HANDLE>(_get_osfhandle(_fileno(f)));
if (!::SetHandleInformation(file_handle, HANDLE_FLAG_INHERIT, 0))
throw spdlog_ex("SetHandleInformation failed", errno);
#endif