CPUDetect: improve win/arm64 support

read brand_string on macos/arm64
remove unused flags
report family/model info instead of vendor name
This commit is contained in:
Shawn Hoffman
2022-07-18 21:45:27 -07:00
parent e4ff49769c
commit 76b4318b88
9 changed files with 422 additions and 229 deletions

View File

@ -248,6 +248,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;