Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2020-08-07 14:37:22 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-08-07 14:38:07 +0300
commitc04088fed1b8faea6b2928bb5e09ab367076950c (patch)
treef4aed4491f5af44dade7d84a52901a56fd6dddd7 /source/blender/ikplugin/intern/itasc_plugin.cpp
parent3d48d99647b59a6f0461baa4456660917f1bbda6 (diff)
Cleanup: Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule. This should be the final commit of the series of commits that addresses this particular rule. No functional changes.
Diffstat (limited to 'source/blender/ikplugin/intern/itasc_plugin.cpp')
-rw-r--r--source/blender/ikplugin/intern/itasc_plugin.cpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/source/blender/ikplugin/intern/itasc_plugin.cpp b/source/blender/ikplugin/intern/itasc_plugin.cpp
index 8f84d04f602..a5fdb9ef491 100644
--- a/source/blender/ikplugin/intern/itasc_plugin.cpp
+++ b/source/blender/ikplugin/intern/itasc_plugin.cpp
@@ -446,24 +446,21 @@ static double EulerAngleFromMatrix(const KDL::Rotation &R, int axis)
if (axis == 0) {
return -KDL::atan2(R(1, 2), R(2, 2));
}
- else if (axis == 1) {
+ if (axis == 1) {
return KDL::atan2(-R(0, 2), t);
}
- else {
- return -KDL::atan2(R(0, 1), R(0, 0));
- }
+
+ return -KDL::atan2(R(0, 1), R(0, 0));
}
- else {
- if (axis == 0) {
- return -KDL::atan2(-R(2, 1), R(1, 1));
- }
- else if (axis == 1) {
- return KDL::atan2(-R(0, 2), t);
- }
- else {
- return 0.0f;
- }
+
+ if (axis == 0) {
+ return -KDL::atan2(-R(2, 1), R(1, 1));
+ }
+ if (axis == 1) {
+ return KDL::atan2(-R(0, 2), t);
}
+
+ return 0.0f;
}
static double ComputeTwist(const KDL::Rotation &R)