C++ warning fixes

Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
Alexander Borsuk
2025-08-01 13:33:12 +02:00
committed by Konstantin Pastbin
parent a28d5d15ce
commit 2aaf37e9ee
15 changed files with 35 additions and 34 deletions

View File

@@ -240,9 +240,9 @@ FreetypeError constexpr g_FT_Errors[] =
auto const & currPos = glyphPos[i];
auto const & metrics = m_fontFace->glyph->metrics;
auto const xOffset = (currPos.x_offset + static_cast<int32_t>(metrics.horiBearingX)) >> 6;
auto const xOffset = static_cast<int32_t>((currPos.x_offset + metrics.horiBearingX) >> 6);
// The original Drape code expects a bottom, not a top offset in its calculations.
auto const yOffset = (currPos.y_offset + static_cast<int32_t>(metrics.horiBearingY) - metrics.height) >> 6;
auto const yOffset = static_cast<int32_t>((currPos.y_offset + metrics.horiBearingY - metrics.height) >> 6);
int32_t const xAdvance = currPos.x_advance >> 6;
// yAdvance is always zero for horizontal text layouts.