diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-05-02 17:45:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-02 17:45:13 +0200 |
commit | 78193788d0e779e1471f632bae61adad4adbc078 (patch) | |
tree | 6e1d28ad398befd964bca92e2bd77dba8a802d76 /core/math | |
parent | 652650c10c162a9d1e65099aa00bc4bf534a5bad (diff) | |
parent | c273ddc3eefce78f8eed86dbc71fffd1b0443e2a (diff) |
Merge pull request #59895 from akien-mga/clang-tidy
Diffstat (limited to 'core/math')
-rw-r--r-- | core/math/convex_hull.cpp | 2 | ||||
-rw-r--r-- | core/math/geometry_2d.cpp | 6 | ||||
-rw-r--r-- | core/math/random_pcg.h | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/core/math/convex_hull.cpp b/core/math/convex_hull.cpp index 23a0b5dd54..996f4f4d67 100644 --- a/core/math/convex_hull.cpp +++ b/core/math/convex_hull.cpp @@ -666,7 +666,7 @@ public: face_pool.reset(true); } - Vertex *vertex_list; + Vertex *vertex_list = nullptr; void compute(const Vector3 *p_coords, int32_t p_count); diff --git a/core/math/geometry_2d.cpp b/core/math/geometry_2d.cpp index 46b7d99b43..31fade5a99 100644 --- a/core/math/geometry_2d.cpp +++ b/core/math/geometry_2d.cpp @@ -74,14 +74,14 @@ Vector<Vector<Vector2>> Geometry2D::decompose_polygon_in_convex(Vector<Point2> p struct _AtlasWorkRect { Size2i s; Point2i p; - int idx; + int idx = 0; _FORCE_INLINE_ bool operator<(const _AtlasWorkRect &p_r) const { return s.width > p_r.s.width; }; }; struct _AtlasWorkRectResult { Vector<_AtlasWorkRect> result; - int max_w; - int max_h; + int max_w = 0; + int max_h = 0; }; void Geometry2D::make_atlas(const Vector<Size2i> &p_rects, Vector<Point2i> &r_result, Size2i &r_size) { diff --git a/core/math/random_pcg.h b/core/math/random_pcg.h index 65fcf67664..a088b30d17 100644 --- a/core/math/random_pcg.h +++ b/core/math/random_pcg.h @@ -61,8 +61,8 @@ static int __bsr_clz32(uint32_t x) { class RandomPCG { pcg32_random_t pcg; - uint64_t current_seed; // The seed the current generator state started from. - uint64_t current_inc; + uint64_t current_seed = 0; // The seed the current generator state started from. + uint64_t current_inc = 0; public: static const uint64_t DEFAULT_SEED = 12047754176567800795U; |