Merge pull request #26134 from marxin/fix-Wsign-compare

Fix -Wsign-compare warnings.
This commit is contained in:
Rémi Verschelde
2019-02-27 09:22:47 +01:00
committed by GitHub
21 changed files with 40 additions and 41 deletions
+1 -1
View File
@@ -509,7 +509,7 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur
texture = texture->get_ptr();
if (next_power_of_2(texture->alloc_width) != texture->alloc_width && next_power_of_2(texture->alloc_height) != texture->alloc_height) {
if (next_power_of_2(texture->alloc_width) != (unsigned int)texture->alloc_width && next_power_of_2(texture->alloc_height) != (unsigned int)texture->alloc_height) {
state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_FORCE_REPEAT, true);
can_tile = false;
}
+1 -1
View File
@@ -156,7 +156,7 @@ void RasterizerSceneGLES2::shadow_atlas_set_quadrant_subdivision(RID p_atlas, in
subdiv = int(Math::sqrt((float)subdiv));
if (shadow_atlas->quadrants[p_quadrant].shadows.size() == subdiv)
if (shadow_atlas->quadrants[p_quadrant].shadows.size() == (int)subdiv)
return;
// erase all data from the quadrant
+1 -1
View File
@@ -246,7 +246,7 @@ void FileAccessUnix::store_8(uint8_t p_dest) {
void FileAccessUnix::store_buffer(const uint8_t *p_src, int p_length) {
ERR_FAIL_COND(!f);
ERR_FAIL_COND(fwrite(p_src, 1, p_length, f) != p_length);
ERR_FAIL_COND((int)fwrite(p_src, 1, p_length, f) != p_length);
}
bool FileAccessUnix::file_exists(const String &p_path) {