Guarantee C locale

*  Remove all calls to setlocale to ensure that the global
   locale is always C.

*  Also replace beast::SystemStats::getNumCpus() with
   std:🧵:hardware_concurrency()
This commit is contained in:
Howard Hinnant
2014-10-13 19:20:53 -04:00
committed by Tom Ritchford
parent 7847ac3144
commit e965b7c0da
7 changed files with 4 additions and 113 deletions

View File

@@ -47,7 +47,7 @@ String SystemStats::getBeastVersion()
struct CPUInformation
{
CPUInformation() noexcept
: numCpus (0), hasMMX (false), hasSSE (false),
: hasMMX (false), hasSSE (false),
hasSSE2 (false), hasSSE3 (false), has3DNow (false)
{
initialise();
@@ -55,7 +55,6 @@ struct CPUInformation
void initialise() noexcept;
int numCpus;
bool hasMMX, hasSSE, hasSSE2, hasSSE3, has3DNow;
};
@@ -65,7 +64,6 @@ static const CPUInformation& getCPUInformation() noexcept
return info;
}
int SystemStats::getNumCpus() noexcept { return getCPUInformation().numCpus; }
bool SystemStats::hasMMX() noexcept { return getCPUInformation().hasMMX; }
bool SystemStats::hasSSE() noexcept { return getCPUInformation().hasSSE; }
bool SystemStats::hasSSE2() noexcept { return getCPUInformation().hasSSE2; }