🔥 conditional_cast

This commit is contained in:
Vladislav Nepogodin
2021-12-19 21:37:21 +04:00
parent f81cb9f365
commit f096c615c3
2 changed files with 18 additions and 4 deletions

View File

@@ -405,9 +405,9 @@ SPDLOG_INLINE int pid() SPDLOG_NOEXCEPT
{
#ifdef _WIN32
return static_cast<int>(::GetCurrentProcessId());
return conditional_static_cast<int>(::GetCurrentProcessId());
#else
return static_cast<int>(::getpid());
return conditional_static_cast<int>(::getpid());
#endif
}