summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/camera_2d.cpp8
-rw-r--r--scene/2d/collision_polygon_2d.cpp2
-rw-r--r--scene/2d/tile_map.cpp2
3 files changed, 6 insertions, 6 deletions
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp
index 3b86ca76ea..788a39d05d 100644
--- a/scene/2d/camera_2d.cpp
+++ b/scene/2d/camera_2d.cpp
@@ -422,14 +422,14 @@ void Camera2D::clear_current() {
void Camera2D::set_limit(Margin p_margin, int p_limit) {
- ERR_FAIL_INDEX(p_margin, 4);
+ ERR_FAIL_INDEX((int)p_margin, 4);
limit[p_margin] = p_limit;
update();
}
int Camera2D::get_limit(Margin p_margin) const {
- ERR_FAIL_INDEX_V(p_margin, 4, 0);
+ ERR_FAIL_INDEX_V((int)p_margin, 4, 0);
return limit[p_margin];
}
@@ -446,14 +446,14 @@ bool Camera2D::is_limit_smoothing_enabled() const {
void Camera2D::set_drag_margin(Margin p_margin, float p_drag_margin) {
- ERR_FAIL_INDEX(p_margin, 4);
+ ERR_FAIL_INDEX((int)p_margin, 4);
drag_margin[p_margin] = p_drag_margin;
update();
}
float Camera2D::get_drag_margin(Margin p_margin) const {
- ERR_FAIL_INDEX_V(p_margin, 4, 0);
+ ERR_FAIL_INDEX_V((int)p_margin, 4, 0);
return drag_margin[p_margin];
}
diff --git a/scene/2d/collision_polygon_2d.cpp b/scene/2d/collision_polygon_2d.cpp
index 508ceeaaf9..410b27c691 100644
--- a/scene/2d/collision_polygon_2d.cpp
+++ b/scene/2d/collision_polygon_2d.cpp
@@ -247,7 +247,7 @@ Vector<Point2> CollisionPolygon2D::get_polygon() const {
void CollisionPolygon2D::set_build_mode(BuildMode p_mode) {
- ERR_FAIL_INDEX(p_mode, 2);
+ ERR_FAIL_INDEX((int)p_mode, 2);
build_mode = p_mode;
if (parent) {
_build_polygon();
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp
index 5b8d10ea85..a60ce47f5c 100644
--- a/scene/2d/tile_map.cpp
+++ b/scene/2d/tile_map.cpp
@@ -304,7 +304,7 @@ void TileMap::update_dirty_quadrants() {
}
q.occluder_instances.clear();
Ref<ShaderMaterial> prev_material;
- int prev_z_index;
+ int prev_z_index = 0;
RID prev_canvas_item;
RID prev_debug_canvas_item;