summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-11-02 22:36:01 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-11-02 22:36:01 +0100
commitd4bf7f44583b977e9d13a4b7ad25faa529da2eca (patch)
tree01623abb92556fc2d18c82d482fb51c3a5c8795c /scene/main
parent754552b34d3523a76656940145bd37328536292d (diff)
Fixup Clang -Wtype-limits warnings introduced by #52350
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/canvas_item.cpp4
-rw-r--r--scene/main/viewport.cpp4
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));
}