mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
fix: suppress wchar_t '>= 0' tautological comparison warning on arm64
On Windows arm64, wchar_t is unsigned so 'wc >= 0' is always true and GCC/Clang emit -Wtype-limits. Drop the redundant lower bound check — only the upper bound 'wc <= 0x7f' is needed.
This commit is contained in:
parent
b4469b1577
commit
7c8bda0907
1 changed files with 1 additions and 1 deletions
|
|
@ -64,7 +64,7 @@ std::string narrowWString(const wchar_t* msg) {
|
|||
std::string out;
|
||||
for (const wchar_t* p = msg; *p; ++p) {
|
||||
const wchar_t wc = *p;
|
||||
if (wc >= 0 && wc <= 0x7f) {
|
||||
if (wc <= 0x7f) {
|
||||
out.push_back(static_cast<char>(wc));
|
||||
} else {
|
||||
out.push_back('?');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue