From d4bf7f44583b977e9d13a4b7ad25faa529da2eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 2 Nov 2022 22:36:01 +0100 Subject: Fixup Clang -Wtype-limits warnings introduced by #52350 --- scene/main/canvas_item.cpp | 4 ++-- scene/main/viewport.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'scene/main') diff --git a/scene/main/canvas_item.cpp b/scene/main/canvas_item.cpp index 3bf4e95e68..7bcd4721fc 100644 --- a/scene/main/canvas_item.cpp +++ b/scene/main/canvas_item.cpp @@ -1112,7 +1112,7 @@ uint32_t CanvasItem::get_visibility_layer() const { } void CanvasItem::set_visibility_layer_bit(uint32_t p_visibility_layer, bool p_enable) { - ERR_FAIL_INDEX(p_visibility_layer, 32); + ERR_FAIL_UNSIGNED_INDEX(p_visibility_layer, 32); if (p_enable) { set_visibility_layer(visibility_layer | (1 << p_visibility_layer)); } else { @@ -1121,7 +1121,7 @@ void CanvasItem::set_visibility_layer_bit(uint32_t p_visibility_layer, bool p_en } bool CanvasItem::get_visibility_layer_bit(uint32_t p_visibility_layer) const { - ERR_FAIL_INDEX_V(p_visibility_layer, 32, false); + ERR_FAIL_UNSIGNED_INDEX_V(p_visibility_layer, 32, false); return (visibility_layer & (1 << p_visibility_layer)); } diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 2385e4f54a..f8b0a66a71 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -3255,7 +3255,7 @@ uint32_t Viewport::get_canvas_cull_mask() const { } void Viewport::set_canvas_cull_mask_bit(uint32_t p_layer, bool p_enable) { - ERR_FAIL_INDEX(p_layer, 32); + ERR_FAIL_UNSIGNED_INDEX(p_layer, 32); if (p_enable) { set_canvas_cull_mask(canvas_cull_mask | (1 << p_layer)); } else { @@ -3264,7 +3264,7 @@ void Viewport::set_canvas_cull_mask_bit(uint32_t p_layer, bool p_enable) { } bool Viewport::get_canvas_cull_mask_bit(uint32_t p_layer) const { - ERR_FAIL_INDEX_V(p_layer, 32, false); + ERR_FAIL_UNSIGNED_INDEX_V(p_layer, 32, false); return (canvas_cull_mask & (1 << p_layer)); } -- cgit v1.2.3