From 28af8707505a6bd33a83a3fbaa88bac88d9c414b Mon Sep 17 00:00:00 2001 From: Markus Sauermann <6299227+Sauermann@users.noreply.github.com> Date: Fri, 28 Oct 2022 01:39:28 +0200 Subject: Code simplifications found by cppcheck They are based on: - Boolean arithmetic simplifications - setting variables that are not accessed - constant variables --- scene/resources/animation.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'scene/resources') diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index e3c12b7e52..da73a479ce 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -2464,7 +2464,6 @@ T Animation::_interpolate(const Vector> &p_keys, double p_time, Interpol ERR_FAIL_COND_V(idx == -2, T()); - bool result = true; int next = 0; real_t c = 0.0; // prepare for all cases of interpolation @@ -2596,10 +2595,7 @@ T Animation::_interpolate(const Vector> &p_keys, double p_time, Interpol } if (p_ok) { - *p_ok = result; - } - if (!result) { - return T(); + *p_ok = true; } real_t tr = p_keys[idx].transition; -- cgit v1.2.3