suppress some warnings

This commit is contained in:
ohyzha
2025-03-05 13:34:48 +02:00
parent efcee95158
commit c5a0c52530
21 changed files with 34 additions and 36 deletions

View File

@@ -148,7 +148,7 @@ namespace OpenVulkano::Scene
{
char* baseAddress = static_cast<char*>(m_atlasData->GetTexture()->textureBuffer)
+ glyph.firstGlyphByteInAtlas;
for (int row = 0; row < slot->bitmap.rows; row++)
for (unsigned int row = 0; row < slot->bitmap.rows; row++)
{
std::memcpy(baseAddress - row * m_atlasData->GetTexture()->resolution.x,
&slot->bitmap.buffer[row * slot->bitmap.pitch], slot->bitmap.width);
@@ -181,9 +181,9 @@ namespace OpenVulkano::Scene
{
// RGB RGB RGB
assert(bitmap.width % 3 == 0);
for (int row = 0; row < bitmap.rows; row++)
for (unsigned int row = 0; row < bitmap.rows; row++)
{
for (int col = 0, atlasPos = 0; col < bitmap.width; col += 3, atlasPos += 4)
for (unsigned int col = 0, atlasPos = 0; col < bitmap.width; col += 3, atlasPos += 4)
{
const size_t bitmapPos = row * bitmap.pitch + col;
const size_t texturePos = (glyph.firstGlyphByteInAtlas - row * tex->resolution.x * m_channelsCount) + atlasPos;
@@ -200,9 +200,9 @@ namespace OpenVulkano::Scene
// GGG
// BBB
assert(bitmap.rows % 3 == 0);
for (int row = 0; row < bitmap.rows; row += 3)
for (unsigned int row = 0; row < bitmap.rows; row += 3)
{
for (int col = 0; col < bitmap.width; col++)
for (unsigned int col = 0; col < bitmap.width; col++)
{
const size_t bitmapPos = col + (bitmap.pitch * row);
const size_t texturePos = (glyph.firstGlyphByteInAtlas + col * m_channelsCount)