mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 23:29:44 -06:00
NandPaths: Resolve Android tautological comparison warning
Android interprets char as unsigned char, so comparing with 0 triggers a tautological-unsigned-char-zero-compare warning. Casting c to an unsigned char and removing the comparison with 0 resolves the warning while needing one less comparison on all platforms.
This commit is contained in:
@ -107,7 +107,7 @@ static bool IsIllegalCharacter(char c)
|
|||||||
{
|
{
|
||||||
static const std::unordered_set<char> illegal_chars = {'\"', '*', '/', ':', '<',
|
static const std::unordered_set<char> illegal_chars = {'\"', '*', '/', ':', '<',
|
||||||
'>', '?', '\\', '|', '\x7f'};
|
'>', '?', '\\', '|', '\x7f'};
|
||||||
return (c >= 0 && c <= 0x1F) || illegal_chars.find(c) != illegal_chars.end();
|
return static_cast<unsigned char>(c) <= 0x1F || illegal_chars.find(c) != illegal_chars.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string EscapeFileName(const std::string& filename)
|
std::string EscapeFileName(const std::string& filename)
|
||||||
|
Reference in New Issue
Block a user