diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-09-28 09:47:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-28 09:47:29 +0200 |
commit | c7e646c30a5ca9abcd04383381d9a216cd2ee185 (patch) | |
tree | 431cb56ac164abee8845af163f9c23f7dbc3b1ab /scene/animation/tween.cpp | |
parent | 1c60465c5958446a2daccc54a1c58c3dee9b21a3 (diff) | |
parent | 7b081a7fc8011c5ce7194fc0eabb8768e0f9d4c6 (diff) |
Merge pull request #22447 from akien-mga/fix-warnings-Wswitch
Fix warnings about unhandled enum value in switch [-Wswitch]
Diffstat (limited to 'scene/animation/tween.cpp')
-rw-r--r-- | scene/animation/tween.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp index 82e2bb93e2..3521782417 100644 --- a/scene/animation/tween.cpp +++ b/scene/animation/tween.cpp @@ -277,7 +277,10 @@ Variant &Tween::_get_initial_val(InterpolateData &p_data) { ERR_FAIL_COND_V(error.error != Variant::CallError::CALL_OK, p_data.initial_val); } return initial_val; - } break; + } + + case INTER_CALLBACK: + break; } return p_data.delta_val; } @@ -313,7 +316,7 @@ Variant &Tween::_get_delta_val(InterpolateData &p_data) { if (final_val.get_type() == Variant::INT) final_val = final_val.operator real_t(); _calc_delta_val(p_data.initial_val, final_val, p_data.delta_val); return p_data.delta_val; - } break; + } case TARGETING_PROPERTY: case TARGETING_METHOD: { @@ -325,7 +328,10 @@ Variant &Tween::_get_delta_val(InterpolateData &p_data) { //_calc_delta_val(p_data.initial_val, p_data.final_val, p_data.delta_val); _calc_delta_val(initial_val, p_data.final_val, p_data.delta_val); return p_data.delta_val; - } break; + } + + case INTER_CALLBACK: + break; } return p_data.initial_val; } @@ -857,12 +863,8 @@ bool Tween::seek(real_t p_time) { data.finish = false; } - switch (data.type) { - case INTER_PROPERTY: - case INTER_METHOD: - break; - case INTER_CALLBACK: - continue; + if (data.type == INTER_CALLBACK) { + continue; } Variant result = _run_equation(data); |