Skip to content

Commit

Permalink
Fix compiler warnings for different signed comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
mikke89 committed Jan 14, 2025
1 parent 28907a1 commit b8fe666
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Backends/RmlUi_Renderer_GL2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ Rml::TextureHandle RenderInterface_GL2::LoadTexture(Rml::Vector2i& texture_dimen

Rml::TextureHandle RenderInterface_GL2::GenerateTexture(Rml::Span<const Rml::byte> source, Rml::Vector2i source_dimensions)
{
RMLUI_ASSERT(source.data() && source.size() == source_dimensions.x * source_dimensions.y * 4);
RMLUI_ASSERT(source.data() && source.size() == size_t(source_dimensions.x * source_dimensions.y * 4));

GLuint texture_id = 0;
glGenTextures(1, &texture_id);
Expand Down
2 changes: 1 addition & 1 deletion Backends/RmlUi_Renderer_GL3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,7 @@ Rml::TextureHandle RenderInterface_GL3::LoadTexture(Rml::Vector2i& texture_dimen

Rml::TextureHandle RenderInterface_GL3::GenerateTexture(Rml::Span<const Rml::byte> source_data, Rml::Vector2i source_dimensions)
{
RMLUI_ASSERT(source_data.data() && source_data.size() == source_dimensions.x * source_dimensions.y * 4);
RMLUI_ASSERT(source_data.data() && source_data.size() == size_t(source_dimensions.x * source_dimensions.y * 4));

GLuint texture_id = 0;
glGenTextures(1, &texture_id);
Expand Down
2 changes: 1 addition & 1 deletion Backends/RmlUi_Renderer_SDL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Rml::TextureHandle RenderInterface_SDL::LoadTexture(Rml::Vector2i& texture_dimen

Rml::TextureHandle RenderInterface_SDL::GenerateTexture(Rml::Span<const Rml::byte> source, Rml::Vector2i source_dimensions)
{
RMLUI_ASSERT(source.data() && source.size() == source_dimensions.x * source_dimensions.y * 4);
RMLUI_ASSERT(source.data() && source.size() == size_t(source_dimensions.x * source_dimensions.y * 4));

#if SDL_MAJOR_VERSION >= 3
auto CreateSurface = [&]() {
Expand Down
2 changes: 1 addition & 1 deletion Backends/RmlUi_Renderer_VK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ Rml::TextureHandle RenderInterface_VK::LoadTexture(Rml::Vector2i& texture_dimens

Rml::TextureHandle RenderInterface_VK::GenerateTexture(Rml::Span<const Rml::byte> source_data, Rml::Vector2i source_dimensions)
{
RMLUI_ASSERT(source_data.data() && source_data.size() == source_dimensions.x * source_dimensions.y * 4);
RMLUI_ASSERT(source_data.data() && source_data.size() == size_t(source_dimensions.x * source_dimensions.y * 4));
Rml::String source_name = "generated-texture";
return CreateTexture(source_data, source_dimensions, source_name);
}
Expand Down

0 comments on commit b8fe666

Please sign in to comment.