diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-12 17:01:17 +0200 |
|---|---|---|
| committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 10:01:56 +0200 |
| commit | 1f6f364a56319eabd02c050746fe7df3f55ffee3 (patch) | |
| tree | 8bebdce946466ce8e9476ccd46c9dba62c323938 /core/math/plane.h | |
| parent | e7c9d818766a119089873e4941e4865fb36883ec (diff) | |
| download | redot-engine-1f6f364a56319eabd02c050746fe7df3f55ffee3.tar.gz | |
Port member initialization from constructor to declaration (C++11)
Using `clang-tidy`'s `modernize-use-default-member-init` check and
manual review of the changes, and some extra manual changes that
`clang-tidy` failed to do.
Also went manually through all of `core` to find occurrences that
`clang-tidy` couldn't handle, especially all initializations done
in a constructor without using initializer lists.
Diffstat (limited to 'core/math/plane.h')
| -rw-r--r-- | core/math/plane.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/math/plane.h b/core/math/plane.h index d4f23ff2b6..f91f816556 100644 --- a/core/math/plane.h +++ b/core/math/plane.h @@ -36,7 +36,7 @@ class Plane { public: Vector3 normal; - real_t d; + real_t d = 0; void set_normal(const Vector3 &p_normal); _FORCE_INLINE_ Vector3 get_normal() const { return normal; }; ///Point is coplanar, CMP_EPSILON for precision @@ -75,8 +75,7 @@ public: _FORCE_INLINE_ bool operator!=(const Plane &p_plane) const; operator String() const; - _FORCE_INLINE_ Plane() : - d(0) {} + _FORCE_INLINE_ Plane() {} _FORCE_INLINE_ Plane(real_t p_a, real_t p_b, real_t p_c, real_t p_d) : normal(p_a, p_b, p_c), d(p_d) {} |
