Sfoglia il codice sorgente

Fix for clang warning at distance_to

Marcelo Fernandez 7 anni fa
parent
commit
bbd21c2203
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      core/math/math_2d.h

+ 1 - 1
core/math/math_2d.h

@@ -303,7 +303,7 @@ struct Rect2 {
 
 	inline real_t distance_to(const Vector2 &p_point) const {
 
-		real_t dist;
+		real_t dist = 0.0;
 		bool inside = true;
 
 		if (p_point.x < position.x) {