浏览代码

TileSet: Fix `-Wmaybe-uninitialized` warning on CompatibilityShapeData

Rémi Verschelde 3 月之前
父节点
当前提交
baa92252d3
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      scene/resources/2d/tile_set.h

+ 2 - 2
scene/resources/2d/tile_set.h

@@ -151,8 +151,8 @@ class TileSet : public Resource {
 private:
 	struct CompatibilityShapeData {
 		Vector2i autotile_coords;
-		bool one_way;
-		float one_way_margin;
+		bool one_way = false;
+		float one_way_margin = 0.0f;
 #ifndef PHYSICS_2D_DISABLED
 		Ref<Shape2D> shape;
 #endif // PHYSICS_2D_DISABLED