Codechange: C++11 STL has a function for getting the number of CPU cores.
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user