Codechange: C++11 STL has a function for getting the number of CPU cores.

This commit is contained in:
Michael Lutz
2019-03-17 15:14:17 +01:00
parent ae748166d0
commit 967b27a2c1
6 changed files with 1 additions and 66 deletions

View File

@@ -206,23 +206,6 @@ bool GetClipboardContents(char *buffer, const char *last)
}
#endif
uint GetCPUCoreCount()
{
uint count = 1;
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
if (MacOSVersionIsAtLeast(10, 5, 0)) {
count = (uint)[ [ NSProcessInfo processInfo ] activeProcessorCount ];
} else
#endif
{
#if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5)
count = MPProcessorsScheduled();
#endif
}
return count;
}
/**
* Check if a font is a monospace font.
* @param name Name of the font.