Fix compiler-specific diagnostic in painter.cpp
This commit is contained in:
parent
2205b5e2a7
commit
b53dc0a14a
1 changed files with 12 additions and 1 deletions
|
|
@ -490,11 +490,22 @@ namespace psemek::gfx
|
|||
for (char c : str)
|
||||
{
|
||||
// Guard against unsigned char
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wtype-limits"
|
||||
#pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare"
|
||||
#endif
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-constant-out-of-range-compare"
|
||||
#endif
|
||||
|
||||
if ((c < 32) || (c >= 128)) c = '?';
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
int ty = (c - 32) / 16;
|
||||
int tx = (c - 32) % 16;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue