From 9ee4719ee9316a59532b24416a978e98fa193e33 Mon Sep 17 00:00:00 2001 From: jon-chuang Date: Sun, 16 Apr 2023 21:19:34 +0800 Subject: [PATCH] fix windows --- examples/common.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/common.cpp b/examples/common.cpp index eaa5605b8..4701f9f1e 100644 --- a/examples/common.cpp +++ b/examples/common.cpp @@ -16,7 +16,6 @@ #if defined (_WIN32) #include #include -#include #pragma comment(lib,"kernel32.lib") extern "C" __declspec(dllimport) void* __stdcall GetStdHandle(unsigned long nStdHandle); extern "C" __declspec(dllimport) int __stdcall GetConsoleMode(void* hConsoleHandle, unsigned long* lpMode); @@ -56,7 +55,7 @@ int32_t get_num_physical_cores() { #elif defined(_WIN32) SYSTEM_INFO sysinfo; GetNativeSystemInfo(&sysinfo); - return (in32_t) sysinfo.dwNumberOfProcessors; + return static_cast(sysinfo.dwNumberOfProcessors); #endif return -1; }