diff options
-rw-r--r-- | scene/main/canvas_item.cpp | 4 | ||||
-rw-r--r-- | scene/main/viewport.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
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)); } |