Merge pull request #10876 from shuffle2/cpudetect

CPUDetect: improve win/arm64 support
This commit is contained in:
Admiral H. Curtiss 2022-07-26 12:52:50 +02:00 committed by GitHub
commit 6b419c7ca3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 422 additions and 229 deletions

View file

@ -259,6 +259,13 @@ void ReplaceBreaksWithSpaces(std::string& str)
std::replace(str.begin(), str.end(), '\n', ' ');
}
void TruncateToCString(std::string* s)
{
const size_t terminator = s->find_first_of('\0');
if (terminator != s->npos)
s->resize(terminator);
}
bool TryParse(const std::string& str, bool* const output)
{
float value;