mirror of
https://github.com/SFML/SFML.git
synced 2024-11-24 20:31:05 +08:00
Removed useless cast
Removed useless cast in SFML/System/Utf.inl at line 296. This useless cast creates a warning when using -Wuseless-cast as an option in g++ and clang++. Operations can't be made on types smaller than 4 bytes (32 bits), so types smaller than 4 bytes are converted to at least 4 bytes types, thus rendering the static_cast<Uint32> useless in this particular case.
This commit is contained in:
parent
4dfad062e4
commit
9c8cc19f96
@ -293,7 +293,7 @@ In Utf<16>::decode(In begin, In end, Uint32& output, Uint32 replacement)
|
||||
if ((second >= 0xDC00) && (second <= 0xDFFF))
|
||||
{
|
||||
// The second element is valid: convert the two elements to a UTF-32 character
|
||||
output = static_cast<Uint32>(((first - 0xD800) << 10) + (second - 0xDC00) + 0x0010000);
|
||||
output = ((first - 0xD800) << 10) + (second - 0xDC00) + 0x0010000;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user