close
Skip to content

Removed useless cast#1553

Closed
SGauvin wants to merge 1 commit into
SFML:masterfrom
SGauvin:master
Closed

Removed useless cast#1553
SGauvin wants to merge 1 commit into
SFML:masterfrom
SGauvin:master

Conversation

@SGauvin

@SGauvin SGauvin commented Feb 10, 2019

Copy link
Copy Markdown
Contributor

Description

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 useless in this particular case.

Tasks

  • Tested on Linux
  • Tested on Windows
  • Tested on macOS
  • Tested on iOS
  • Tested on Android

How to test this PR?

This is just to remove a warning

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.
@eXpl0it3r eXpl0it3r added this to the 2.6 milestone Feb 11, 2019
@eXpl0it3r

Copy link
Copy Markdown
Member

Merged in 9c8cc19
Thanks for your contribution! 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants