diff options
author | Nathan Franke <me@nathan.sh> | 2022-01-27 10:34:33 -0600 |
---|---|---|
committer | Nathan Franke <me@nathan.sh> | 2022-01-29 04:41:03 -0600 |
commit | 8a0a3acceee804b91afe31022cf0310c01162f73 (patch) | |
tree | 7bd0ff57dadd6d26c5d03bd49658c6c4568788c1 /scene/3d | |
parent | 01f5d7c616920373ff7d140673bc6f8301213713 (diff) |
simplify formatting scripts, add a clang-tidy script, and run clang-tidy
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/node_3d.cpp | 3 | ||||
-rw-r--r-- | scene/3d/sprite_3d.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/scene/3d/node_3d.cpp b/scene/3d/node_3d.cpp index 515d2cfdc7..cad1201d63 100644 --- a/scene/3d/node_3d.cpp +++ b/scene/3d/node_3d.cpp @@ -300,8 +300,9 @@ Node3D *Node3D::get_parent_node_3d() const { } Transform3D Node3D::get_relative_transform(const Node *p_parent) const { - if (p_parent == this) + if (p_parent == this) { return Transform3D(); + } ERR_FAIL_COND_V(!data.parent, Transform3D()); diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp index a37fce9469..331d58927b 100644 --- a/scene/3d/sprite_3d.cpp +++ b/scene/3d/sprite_3d.cpp @@ -1088,8 +1088,9 @@ void AnimatedSprite3D::set_frame(int p_frame) { if (frames->has_animation(animation)) { int limit = frames->get_frame_count(animation); - if (p_frame >= limit) + if (p_frame >= limit) { p_frame = limit - 1; + } } if (p_frame < 0) { |