diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-09-04 13:04:47 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-09-04 13:04:47 +0300 |
commit | 8057ab10db5945db18ccb45265b91ce120ae0be5 (patch) | |
tree | 974381c1d2264099848b2c1c5ed8a469a980a32e /source/blender/io/collada/BCAnimationCurve.cpp | |
parent | 371ddda4d0b3c2ef0c40f604715db801dc33b669 (diff) |
Cleanup: Clang-Tidy readability-const-return-type fixes
No functional changes.
Diffstat (limited to 'source/blender/io/collada/BCAnimationCurve.cpp')
-rw-r--r-- | source/blender/io/collada/BCAnimationCurve.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/source/blender/io/collada/BCAnimationCurve.cpp b/source/blender/io/collada/BCAnimationCurve.cpp index 5fdbb65fb6e..559a17eda9f 100644 --- a/source/blender/io/collada/BCAnimationCurve.cpp +++ b/source/blender/io/collada/BCAnimationCurve.cpp @@ -124,12 +124,12 @@ BCAnimationCurve::~BCAnimationCurve() } } -const bool BCAnimationCurve::is_of_animation_type(BC_animation_type type) const +bool BCAnimationCurve::is_of_animation_type(BC_animation_type type) const { return curve_key.get_animation_type() == type; } -const std::string BCAnimationCurve::get_channel_target() const +std::string BCAnimationCurve::get_channel_target() const { const std::string path = curve_key.get_path(); @@ -139,13 +139,13 @@ const std::string BCAnimationCurve::get_channel_target() const return bc_string_after(path, "."); } -const std::string BCAnimationCurve::get_channel_type() const +std::string BCAnimationCurve::get_channel_type() const { const std::string channel = get_channel_target(); return bc_string_after(channel, "."); } -const std::string BCAnimationCurve::get_channel_posebone() const +std::string BCAnimationCurve::get_channel_posebone() const { const std::string channel = get_channel_target(); std::string pose_bone_name = bc_string_before(channel, "."); @@ -159,7 +159,7 @@ const std::string BCAnimationCurve::get_channel_posebone() const return pose_bone_name; } -const std::string BCAnimationCurve::get_animation_name(Object *ob) const +std::string BCAnimationCurve::get_animation_name(Object *ob) const { std::string name; @@ -201,22 +201,22 @@ const std::string BCAnimationCurve::get_animation_name(Object *ob) const return name; } -const int BCAnimationCurve::get_channel_index() const +int BCAnimationCurve::get_channel_index() const { return curve_key.get_array_index(); } -const int BCAnimationCurve::get_subindex() const +int BCAnimationCurve::get_subindex() const { return curve_key.get_subindex(); } -const std::string BCAnimationCurve::get_rna_path() const +std::string BCAnimationCurve::get_rna_path() const { return curve_key.get_path(); } -const int BCAnimationCurve::sample_count() const +int BCAnimationCurve::sample_count() const { if (fcurve == NULL) { return 0; @@ -224,7 +224,7 @@ const int BCAnimationCurve::sample_count() const return fcurve->totvert; } -const int BCAnimationCurve::closest_index_above(const float sample_frame, const int start_at) const +int BCAnimationCurve::closest_index_above(const float sample_frame, const int start_at) const { if (fcurve == NULL) { return -1; @@ -238,7 +238,7 @@ const int BCAnimationCurve::closest_index_above(const float sample_frame, const return (fcurve->totvert > start_at + 1) ? start_at + 1 : start_at; } -const int BCAnimationCurve::closest_index_below(const float sample_frame) const +int BCAnimationCurve::closest_index_below(const float sample_frame) const { if (fcurve == NULL) { return -1; @@ -271,7 +271,7 @@ const int BCAnimationCurve::closest_index_below(const float sample_frame) const return (fraction < 0.5) ? lower_index : upper_index; } -const int BCAnimationCurve::get_interpolation_type(float sample_frame) const +int BCAnimationCurve::get_interpolation_type(float sample_frame) const { const int index = closest_index_below(sample_frame); if (index < 0) { @@ -280,7 +280,7 @@ const int BCAnimationCurve::get_interpolation_type(float sample_frame) const return fcurve->bezt[index].ipo; } -const FCurve *BCAnimationCurve::get_fcurve() const +FCurve *BCAnimationCurve::get_fcurve() const { return fcurve; } @@ -329,20 +329,20 @@ void BCAnimationCurve::clean_handles() } } -const bool BCAnimationCurve::is_transform_curve() const +bool BCAnimationCurve::is_transform_curve() const { std::string channel_type = this->get_channel_type(); return (is_rotation_curve() || channel_type == "scale" || channel_type == "location"); } -const bool BCAnimationCurve::is_rotation_curve() const +bool BCAnimationCurve::is_rotation_curve() const { std::string channel_type = this->get_channel_type(); return (channel_type == "rotation" || channel_type == "rotation_euler" || channel_type == "rotation_quaternion"); } -const float BCAnimationCurve::get_value(const float frame) +float BCAnimationCurve::get_value(const float frame) { if (fcurve) { return evaluate_fcurve(fcurve, frame); @@ -590,22 +590,22 @@ void BCCurveKey::operator=(const BCCurveKey &other) this->curve_subindex = other.curve_subindex; } -const std::string BCCurveKey::get_full_path() const +std::string BCCurveKey::get_full_path() const { return this->rna_path + '[' + std::to_string(this->curve_array_index) + ']'; } -const std::string BCCurveKey::get_path() const +std::string BCCurveKey::get_path() const { return this->rna_path; } -const int BCCurveKey::get_array_index() const +int BCCurveKey::get_array_index() const { return this->curve_array_index; } -const int BCCurveKey::get_subindex() const +int BCCurveKey::get_subindex() const { return this->curve_subindex; } @@ -615,12 +615,12 @@ void BCCurveKey::set_object_type(BC_animation_type object_type) this->key_type = object_type; } -const BC_animation_type BCCurveKey::get_animation_type() const +BC_animation_type BCCurveKey::get_animation_type() const { return this->key_type; } -const bool BCCurveKey::operator<(const BCCurveKey &other) const +bool BCCurveKey::operator<(const BCCurveKey &other) const { /* needed for using this class as key in maps and sets */ if (this->key_type != other.key_type) { @@ -642,22 +642,22 @@ BCBezTriple::BCBezTriple(BezTriple &bezt) : bezt(bezt) { } -const float BCBezTriple::get_frame() const +float BCBezTriple::get_frame() const { return bezt.vec[1][0]; } -const float BCBezTriple::get_time(Scene *scene) const +float BCBezTriple::get_time(Scene *scene) const { return FRA2TIME(bezt.vec[1][0]); } -const float BCBezTriple::get_value() const +float BCBezTriple::get_value() const { return bezt.vec[1][1]; } -const float BCBezTriple::get_angle() const +float BCBezTriple::get_angle() const { return RAD2DEGF(get_value()); } |