Fix type conversion warnings

This commit is contained in:
Lukas Dürrenberger 2021-04-20 10:31:24 +02:00 committed by Lukas Dürrenberger
parent 9052ccf218
commit e01aa152c1
2 changed files with 3 additions and 3 deletions

View File

@ -70,7 +70,7 @@ a(alpha)
////////////////////////////////////////////////////////////
Color::Color(Uint32 color) :
r((color & 0xff000000) >> 24),
g((color & 0x00ff0000) >> 16),
g(static_cast<Uint8>((color & 0x00ff0000) >> 16)),
b((color & 0x0000ff00) >> 8 ),
a((color & 0x000000ff) >> 0 )
{

View File

@ -391,8 +391,8 @@ float Font::getKerning(Uint32 first, Uint32 second, unsigned int characterSize,
FT_UInt index2 = FT_Get_Char_Index(face, second);
// Retrieve position compensation deltas generated by FT_LOAD_FORCE_AUTOHINT flag
float firstRsbDelta = getGlyph(first, characterSize, bold).rsbDelta;
float secondLsbDelta = getGlyph(second, characterSize, bold).lsbDelta;
float firstRsbDelta = static_cast<float>(getGlyph(first, characterSize, bold).rsbDelta);
float secondLsbDelta = static_cast<float>(getGlyph(second, characterSize, bold).lsbDelta);
// Get the kerning vector if present
FT_Vector kerning;