diff options
| author | Shawn Hoffman <godisgovernment@gmail.com> | 2022-07-18 21:45:27 -0700 |
|---|---|---|
| committer | Shawn Hoffman <godisgovernment@gmail.com> | 2022-07-25 21:21:11 -0700 |
| commit | 76b4318b88cb952750da158809e68274adbd9493 (patch) | |
| tree | 2e3faf2776a3f9872460ea352fe63b18c075399c /Source/Core/Common/StringUtil.cpp | |
| parent | e4ff49769c687e892219dab628ad5c7850efa49d (diff) | |
CPUDetect: improve win/arm64 support
read brand_string on macos/arm64
remove unused flags
report family/model info instead of vendor name
Diffstat (limited to 'Source/Core/Common/StringUtil.cpp')
| -rw-r--r-- | Source/Core/Common/StringUtil.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/Core/Common/StringUtil.cpp b/Source/Core/Common/StringUtil.cpp index c498e261fd..2ab4601439 100644 --- a/Source/Core/Common/StringUtil.cpp +++ b/Source/Core/Common/StringUtil.cpp @@ -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; |
