Remove unhelpful unsigned casting trick

Change-Id: Ice86f060974c51bbaf051ed8c5a369ce80ecfe15
This commit is contained in:
Aidan MacDonald 2021-08-07 15:57:00 +01:00
parent 39fff5cb53
commit cf3fa437fc
1 changed files with 3 additions and 8 deletions

View File

@ -61,14 +61,9 @@ INLINE unsigned range_limit(int value)
return value;
#else
value += 128;
if ((unsigned)value <= 255)
return value;
if (value < 0)
return 0;
return 255;
if(value < 0) return 0;
if(value > 255) return 255;
return value;
#endif
}