diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 10:15:48 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 13:45:01 +0200 |
commit | 1a8167867b136ae62463b26a871628526bff17b8 (patch) | |
tree | be6ca573229dc092d567079c5b464f72144d895d /core/math/geometry.h | |
parent | 5f5f53e8eba5c9b708714de58d3cca6ceb010279 (diff) |
Modernize remaining uses of 0/NULL instead of nullptr (C++11)
Using clang-tidy's `modernize-use-nullptr`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
Diffstat (limited to 'core/math/geometry.h')
-rw-r--r-- | core/math/geometry.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/math/geometry.h b/core/math/geometry.h index 45c8558fac..b90cae3786 100644 --- a/core/math/geometry.h +++ b/core/math/geometry.h @@ -190,7 +190,7 @@ public: return dP.length(); // Return the closest distance. } - static inline bool ray_intersects_triangle(const Vector3 &p_from, const Vector3 &p_dir, const Vector3 &p_v0, const Vector3 &p_v1, const Vector3 &p_v2, Vector3 *r_res = 0) { + static inline bool ray_intersects_triangle(const Vector3 &p_from, const Vector3 &p_dir, const Vector3 &p_v0, const Vector3 &p_v1, const Vector3 &p_v2, Vector3 *r_res = nullptr) { Vector3 e1 = p_v1 - p_v0; Vector3 e2 = p_v2 - p_v0; Vector3 h = p_dir.cross(e2); @@ -225,7 +225,7 @@ public: return false; } - static inline bool segment_intersects_triangle(const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_v0, const Vector3 &p_v1, const Vector3 &p_v2, Vector3 *r_res = 0) { + static inline bool segment_intersects_triangle(const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_v0, const Vector3 &p_v1, const Vector3 &p_v2, Vector3 *r_res = nullptr) { Vector3 rel = p_to - p_from; Vector3 e1 = p_v1 - p_v0; @@ -262,7 +262,7 @@ public: return false; } - static inline bool segment_intersects_sphere(const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_sphere_pos, real_t p_sphere_radius, Vector3 *r_res = 0, Vector3 *r_norm = 0) { + static inline bool segment_intersects_sphere(const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_sphere_pos, real_t p_sphere_radius, Vector3 *r_res = nullptr, Vector3 *r_norm = nullptr) { Vector3 sphere_pos = p_sphere_pos - p_from; Vector3 rel = (p_to - p_from); @@ -298,7 +298,7 @@ public: return true; } - static inline bool segment_intersects_cylinder(const Vector3 &p_from, const Vector3 &p_to, real_t p_height, real_t p_radius, Vector3 *r_res = 0, Vector3 *r_norm = 0) { + static inline bool segment_intersects_cylinder(const Vector3 &p_from, const Vector3 &p_to, real_t p_height, real_t p_radius, Vector3 *r_res = nullptr, Vector3 *r_norm = nullptr) { Vector3 rel = (p_to - p_from); real_t rel_l = rel.length(); |