mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-28 13:46:13 +01:00
Remove unnecessary static_casts
This commit is contained in:
1 parent
b626f65ee5
commit
6ce8f95553
3 files changed
+7
-7
No files matched your search
@@ -253,10 +253,10 @@ void sfShader_setIntColorUniform(sfShader* shader, const char* name, sfColor col
|
|||||||
sfShader_setIvec4Uniform(shader,
|
sfShader_setIvec4Uniform(shader,
|
||||||
name,
|
name,
|
||||||
{
|
{
|
||||||
static_cast<int>(color.r),
|
color.r,
|
||||||
static_cast<int>(color.g),
|
color.g,
|
||||||
static_cast<int>(color.b),
|
color.b,
|
||||||
static_cast<int>(color.a),
|
color.a,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ bool sfPacket_endOfPacket(const sfPacket* packet)
|
|||||||
bool sfPacket_canRead(const sfPacket* packet)
|
bool sfPacket_canRead(const sfPacket* packet)
|
||||||
{
|
{
|
||||||
assert(packet);
|
assert(packet);
|
||||||
return static_cast<bool>(*packet);
|
return bool{*packet};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ TEST_CASE("[Window] sfJoystick")
|
|||||||
// no joysticks will be detected. This is how we can ensure these
|
// no joysticks will be detected. This is how we can ensure these
|
||||||
// tests are portable and reliable.
|
// tests are portable and reliable.
|
||||||
|
|
||||||
const auto joystick = GENERATE(range(0u, static_cast<unsigned int>(sfJoystickCount - 1)));
|
const auto joystick = GENERATE(range(0u, unsigned{sfJoystickCount - 1}));
|
||||||
|
|
||||||
SECTION("sfJoystick_isConnected()")
|
SECTION("sfJoystick_isConnected()")
|
||||||
{
|
{
|
||||||
@@ -56,7 +56,7 @@ TEST_CASE("[Window] sfJoystick")
|
|||||||
|
|
||||||
SECTION("sfJoystick_isButtonPressed()")
|
SECTION("sfJoystick_isButtonPressed()")
|
||||||
{
|
{
|
||||||
const auto button = GENERATE(range(0u, static_cast<unsigned int>(sfJoystickButtonCount - 1)));
|
const auto button = GENERATE(range(0u, unsigned{sfJoystickButtonCount - 1}));
|
||||||
CHECK(!sfJoystick_isButtonPressed(joystick, button));
|
CHECK(!sfJoystick_isButtonPressed(joystick, button));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user