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:
-rw-r--r--.clang-tidy1
-rw-r--r--source/blender/blenkernel/intern/volume.cc2
-rw-r--r--source/blender/freestyle/intern/stroke/Curve.cpp2
-rw-r--r--source/blender/freestyle/intern/stroke/Curve.h2
-rw-r--r--source/blender/freestyle/intern/view_map/Silhouette.cpp6
-rw-r--r--source/blender/freestyle/intern/view_map/Silhouette.h6
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_abstract.h2
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_camera.cc2
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_camera.h2
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_curves.cc2
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_curves.h2
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_hair.cc2
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_hair.h2
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_mesh.cc2
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_mesh.h2
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_nurbs.cc2
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_nurbs.h2
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_points.cc2
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_points.h2
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_transform.cc2
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_transform.h2
-rw-r--r--source/blender/io/collada/AnimationExporter.cpp2
-rw-r--r--source/blender/io/collada/AnimationExporter.h2
-rw-r--r--source/blender/io/collada/AnimationImporter.cpp2
-rw-r--r--source/blender/io/collada/BCAnimationCurve.cpp52
-rw-r--r--source/blender/io/collada/BCAnimationCurve.h52
-rw-r--r--source/blender/io/collada/BCAnimationSampler.cpp18
-rw-r--r--source/blender/io/collada/BCAnimationSampler.h16
-rw-r--r--source/blender/io/collada/BCMath.cpp2
-rw-r--r--source/blender/io/collada/BCMath.h2
-rw-r--r--source/blender/io/collada/BCSampleData.cpp2
-rw-r--r--source/blender/io/collada/BCSampleData.h2
-rw-r--r--source/blender/io/collada/MeshImporter.cpp2
33 files changed, 100 insertions, 103 deletions
diff --git a/.clang-tidy b/.clang-tidy
index 1260d80508f..4a6550a558e 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -14,7 +14,6 @@ Checks: >
-readability-inconsistent-declaration-parameter-name,
-readability-redundant-member-init,
- -readability-const-return-type,
-readability-static-accessed-through-instance,
-readability-redundant-declaration,
-readability-qualified-auto,
diff --git a/source/blender/blenkernel/intern/volume.cc b/source/blender/blenkernel/intern/volume.cc
index 9e873692486..f99be2f6aee 100644
--- a/source/blender/blenkernel/intern/volume.cc
+++ b/source/blender/blenkernel/intern/volume.cc
@@ -371,7 +371,7 @@ struct VolumeGrid {
return NULL;
}
- const bool grid_is_loaded() const
+ bool grid_is_loaded() const
{
return is_loaded;
}
diff --git a/source/blender/freestyle/intern/stroke/Curve.cpp b/source/blender/freestyle/intern/stroke/Curve.cpp
index 51c40c890a3..7129a35ffdb 100644
--- a/source/blender/freestyle/intern/stroke/Curve.cpp
+++ b/source/blender/freestyle/intern/stroke/Curve.cpp
@@ -421,7 +421,7 @@ const Polygon3r &CurvePoint::occludee() const
return __A->getFEdge(*__B)->occludee();
}
-const bool CurvePoint::occludee_empty() const
+bool CurvePoint::occludee_empty() const
{
if (__A == 0) {
return __B->occludee_empty();
diff --git a/source/blender/freestyle/intern/stroke/Curve.h b/source/blender/freestyle/intern/stroke/Curve.h
index 5f0d2a6aed7..518f4ff345b 100644
--- a/source/blender/freestyle/intern/stroke/Curve.h
+++ b/source/blender/freestyle/intern/stroke/Curve.h
@@ -325,7 +325,7 @@ class CurvePoint : public Interface0D {
int occluders_size() const;
const Polygon3r &occludee() const;
const SShape *occluded_shape() const;
- const bool occludee_empty() const;
+ bool occludee_empty() const;
real z_discontinuity() const;
#if 0
float local_average_depth() const;
diff --git a/source/blender/freestyle/intern/view_map/Silhouette.cpp b/source/blender/freestyle/intern/view_map/Silhouette.cpp
index 63c4fc8d5da..3280e56ea7e 100644
--- a/source/blender/freestyle/intern/view_map/Silhouette.cpp
+++ b/source/blender/freestyle/intern/view_map/Silhouette.cpp
@@ -83,7 +83,7 @@ const SShape *SVertex::shape() const
return _Shape;
}
-const int SVertex::qi() const
+int SVertex::qi() const
{
if (getNature() & Nature::T_VERTEX) {
Exception::raiseException();
@@ -139,7 +139,7 @@ const SShape *SVertex::occluded_shape() const
return (_FEdges[0])->occluded_shape();
}
-const bool SVertex::occludee_empty() const
+bool SVertex::occludee_empty() const
{
if (getNature() & Nature::T_VERTEX) {
Exception::raiseException();
@@ -275,7 +275,7 @@ int FEdge::occluders_size() const
return _ViewEdge->occluders_size();
}
-const bool FEdge::occludee_empty() const
+bool FEdge::occludee_empty() const
{
return _ViewEdge->occludee_empty();
}
diff --git a/source/blender/freestyle/intern/view_map/Silhouette.h b/source/blender/freestyle/intern/view_map/Silhouette.h
index 6463cd7eb3e..c27d6b633b4 100644
--- a/source/blender/freestyle/intern/view_map/Silhouette.h
+++ b/source/blender/freestyle/intern/view_map/Silhouette.h
@@ -430,14 +430,14 @@ class SVertex : public Interface0D {
const SShape *shape() const;
float shape_importance() const;
- const int qi() const;
+ int qi() const;
occluder_container::const_iterator occluders_begin() const;
occluder_container::const_iterator occluders_end() const;
bool occluders_empty() const;
int occluders_size() const;
const Polygon3r &occludee() const;
const SShape *occluded_shape() const;
- const bool occludee_empty() const;
+ bool occludee_empty() const;
real z_discontinuity() const;
#if 0
inline float local_average_depth() const;
@@ -907,7 +907,7 @@ class FEdge : public Interface1D {
}
#endif
- const bool occludee_empty() const;
+ bool occludee_empty() const;
real z_discontinuity() const;
#if 0
diff --git a/source/blender/io/alembic/exporter/abc_writer_abstract.h b/source/blender/io/alembic/exporter/abc_writer_abstract.h
index f46409b7902..fefa9c356f2 100644
--- a/source/blender/io/alembic/exporter/abc_writer_abstract.h
+++ b/source/blender/io/alembic/exporter/abc_writer_abstract.h
@@ -67,7 +67,7 @@ class ABCAbstractWriter : public AbstractHierarchyWriter {
* is_supported(). */
virtual void create_alembic_objects(const HierarchyContext *context) = 0;
- virtual const Alembic::Abc::OObject get_alembic_object() const = 0;
+ virtual Alembic::Abc::OObject get_alembic_object() const = 0;
protected:
virtual void do_write(HierarchyContext &context) = 0;
diff --git a/source/blender/io/alembic/exporter/abc_writer_camera.cc b/source/blender/io/alembic/exporter/abc_writer_camera.cc
index 7e7277cb4ea..6f13f791c4e 100644
--- a/source/blender/io/alembic/exporter/abc_writer_camera.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_camera.cc
@@ -62,7 +62,7 @@ void ABCCameraWriter::create_alembic_objects(const HierarchyContext * /*context*
abc_custom_data_container_, "eyeSeparation", timesample_index_);
}
-const Alembic::Abc::OObject ABCCameraWriter::get_alembic_object() const
+Alembic::Abc::OObject ABCCameraWriter::get_alembic_object() const
{
return abc_camera_;
}
diff --git a/source/blender/io/alembic/exporter/abc_writer_camera.h b/source/blender/io/alembic/exporter/abc_writer_camera.h
index a72cfa2f357..ceaa352d162 100644
--- a/source/blender/io/alembic/exporter/abc_writer_camera.h
+++ b/source/blender/io/alembic/exporter/abc_writer_camera.h
@@ -40,7 +40,7 @@ class ABCCameraWriter : public ABCAbstractWriter {
explicit ABCCameraWriter(const ABCWriterConstructorArgs &args);
virtual void create_alembic_objects(const HierarchyContext *context) override;
- virtual const Alembic::Abc::OObject get_alembic_object() const override;
+ virtual Alembic::Abc::OObject get_alembic_object() const override;
protected:
virtual bool is_supported(const HierarchyContext *context) const override;
diff --git a/source/blender/io/alembic/exporter/abc_writer_curves.cc b/source/blender/io/alembic/exporter/abc_writer_curves.cc
index 6f185020b58..9d65830c699 100644
--- a/source/blender/io/alembic/exporter/abc_writer_curves.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_curves.cc
@@ -63,7 +63,7 @@ void ABCCurveWriter::create_alembic_objects(const HierarchyContext *context)
user_prop_resolu.set(cu->resolu);
}
-const Alembic::Abc::OObject ABCCurveWriter::get_alembic_object() const
+Alembic::Abc::OObject ABCCurveWriter::get_alembic_object() const
{
return abc_curve_;
}
diff --git a/source/blender/io/alembic/exporter/abc_writer_curves.h b/source/blender/io/alembic/exporter/abc_writer_curves.h
index 12a909761f5..cd6621c398d 100644
--- a/source/blender/io/alembic/exporter/abc_writer_curves.h
+++ b/source/blender/io/alembic/exporter/abc_writer_curves.h
@@ -42,7 +42,7 @@ class ABCCurveWriter : public ABCAbstractWriter {
explicit ABCCurveWriter(const ABCWriterConstructorArgs &args);
virtual void create_alembic_objects(const HierarchyContext *context) override;
- virtual const Alembic::Abc::OObject get_alembic_object() const override;
+ virtual Alembic::Abc::OObject get_alembic_object() const override;
protected:
virtual void do_write(HierarchyContext &context) override;
diff --git a/source/blender/io/alembic/exporter/abc_writer_hair.cc b/source/blender/io/alembic/exporter/abc_writer_hair.cc
index f9b4619b263..1e1d2cf32ca 100644
--- a/source/blender/io/alembic/exporter/abc_writer_hair.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_hair.cc
@@ -59,7 +59,7 @@ void ABCHairWriter::create_alembic_objects(const HierarchyContext * /*context*/)
abc_curves_schema_ = abc_curves_.getSchema();
}
-const Alembic::Abc::OObject ABCHairWriter::get_alembic_object() const
+Alembic::Abc::OObject ABCHairWriter::get_alembic_object() const
{
return abc_curves_;
}
diff --git a/source/blender/io/alembic/exporter/abc_writer_hair.h b/source/blender/io/alembic/exporter/abc_writer_hair.h
index af1372a08f3..0e149b0d045 100644
--- a/source/blender/io/alembic/exporter/abc_writer_hair.h
+++ b/source/blender/io/alembic/exporter/abc_writer_hair.h
@@ -41,7 +41,7 @@ class ABCHairWriter : public ABCAbstractWriter {
explicit ABCHairWriter(const ABCWriterConstructorArgs &args);
virtual void create_alembic_objects(const HierarchyContext *context) override;
- virtual const Alembic::Abc::OObject get_alembic_object() const override;
+ virtual Alembic::Abc::OObject get_alembic_object() const override;
protected:
virtual void do_write(HierarchyContext &context) override;
diff --git a/source/blender/io/alembic/exporter/abc_writer_mesh.cc b/source/blender/io/alembic/exporter/abc_writer_mesh.cc
index 517f0212712..a9c722cae91 100644
--- a/source/blender/io/alembic/exporter/abc_writer_mesh.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_mesh.cc
@@ -119,7 +119,7 @@ ABCGenericMeshWriter::~ABCGenericMeshWriter()
{
}
-const Alembic::Abc::OObject ABCGenericMeshWriter::get_alembic_object() const
+Alembic::Abc::OObject ABCGenericMeshWriter::get_alembic_object() const
{
if (is_subd_) {
return abc_subdiv_;
diff --git a/source/blender/io/alembic/exporter/abc_writer_mesh.h b/source/blender/io/alembic/exporter/abc_writer_mesh.h
index 94499935181..2bb5b687c47 100644
--- a/source/blender/io/alembic/exporter/abc_writer_mesh.h
+++ b/source/blender/io/alembic/exporter/abc_writer_mesh.h
@@ -56,7 +56,7 @@ class ABCGenericMeshWriter : public ABCAbstractWriter {
virtual ~ABCGenericMeshWriter();
virtual void create_alembic_objects(const HierarchyContext *context) override;
- virtual const Alembic::Abc::OObject get_alembic_object() const override;
+ virtual Alembic::Abc::OObject get_alembic_object() const override;
protected:
virtual bool is_supported(const HierarchyContext *context) const override;
diff --git a/source/blender/io/alembic/exporter/abc_writer_nurbs.cc b/source/blender/io/alembic/exporter/abc_writer_nurbs.cc
index 14cb7773e67..a2dc4441b75 100644
--- a/source/blender/io/alembic/exporter/abc_writer_nurbs.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_nurbs.cc
@@ -70,7 +70,7 @@ void ABCNurbsWriter::create_alembic_objects(const HierarchyContext *context)
}
}
-const OObject ABCNurbsWriter::get_alembic_object() const
+OObject ABCNurbsWriter::get_alembic_object() const
{
if (abc_nurbs_.empty()) {
return OObject();
diff --git a/source/blender/io/alembic/exporter/abc_writer_nurbs.h b/source/blender/io/alembic/exporter/abc_writer_nurbs.h
index 23af4c40556..f7fd8ffe91a 100644
--- a/source/blender/io/alembic/exporter/abc_writer_nurbs.h
+++ b/source/blender/io/alembic/exporter/abc_writer_nurbs.h
@@ -36,7 +36,7 @@ class ABCNurbsWriter : public ABCAbstractWriter {
explicit ABCNurbsWriter(const ABCWriterConstructorArgs &args);
virtual void create_alembic_objects(const HierarchyContext *context) override;
- virtual const Alembic::Abc::OObject get_alembic_object() const override;
+ virtual Alembic::Abc::OObject get_alembic_object() const override;
protected:
virtual bool is_supported(const HierarchyContext *context) const override;
diff --git a/source/blender/io/alembic/exporter/abc_writer_points.cc b/source/blender/io/alembic/exporter/abc_writer_points.cc
index 19870e39a90..350b70b9552 100644
--- a/source/blender/io/alembic/exporter/abc_writer_points.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_points.cc
@@ -55,7 +55,7 @@ void ABCPointsWriter::create_alembic_objects(const HierarchyContext * /*context*
abc_points_schema_ = abc_points_.getSchema();
}
-const Alembic::Abc::OObject ABCPointsWriter::get_alembic_object() const
+Alembic::Abc::OObject ABCPointsWriter::get_alembic_object() const
{
return abc_points_;
}
diff --git a/source/blender/io/alembic/exporter/abc_writer_points.h b/source/blender/io/alembic/exporter/abc_writer_points.h
index 03800b80acf..88dd424ca2a 100644
--- a/source/blender/io/alembic/exporter/abc_writer_points.h
+++ b/source/blender/io/alembic/exporter/abc_writer_points.h
@@ -38,7 +38,7 @@ class ABCPointsWriter : public ABCAbstractWriter {
explicit ABCPointsWriter(const ABCWriterConstructorArgs &args);
virtual void create_alembic_objects(const HierarchyContext *context) override;
- virtual const Alembic::Abc::OObject get_alembic_object() const override;
+ virtual Alembic::Abc::OObject get_alembic_object() const override;
virtual bool is_supported(const HierarchyContext *context) const override;
diff --git a/source/blender/io/alembic/exporter/abc_writer_transform.cc b/source/blender/io/alembic/exporter/abc_writer_transform.cc
index 7694066a13d..93ffd847bf2 100644
--- a/source/blender/io/alembic/exporter/abc_writer_transform.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_transform.cc
@@ -96,7 +96,7 @@ void ABCTransformWriter::do_write(HierarchyContext &context)
write_visibility(context);
}
-const OObject ABCTransformWriter::get_alembic_object() const
+OObject ABCTransformWriter::get_alembic_object() const
{
return abc_xform_;
}
diff --git a/source/blender/io/alembic/exporter/abc_writer_transform.h b/source/blender/io/alembic/exporter/abc_writer_transform.h
index 950bff39c29..9d172531d1f 100644
--- a/source/blender/io/alembic/exporter/abc_writer_transform.h
+++ b/source/blender/io/alembic/exporter/abc_writer_transform.h
@@ -39,7 +39,7 @@ class ABCTransformWriter : public ABCAbstractWriter {
protected:
virtual void do_write(HierarchyContext &context) override;
virtual bool check_is_animated(const HierarchyContext &context) const override;
- virtual const Alembic::Abc::OObject get_alembic_object() const override;
+ virtual Alembic::Abc::OObject get_alembic_object() const override;
};
} // namespace alembic
diff --git a/source/blender/io/collada/AnimationExporter.cpp b/source/blender/io/collada/AnimationExporter.cpp
index a4302a680a3..9ecb890b649 100644
--- a/source/blender/io/collada/AnimationExporter.cpp
+++ b/source/blender/io/collada/AnimationExporter.cpp
@@ -771,7 +771,7 @@ std::string AnimationExporter::collada_linear_interpolation_source(int tot,
return source_id;
}
-const std::string AnimationExporter::get_collada_name(std::string channel_type) const
+std::string AnimationExporter::get_collada_name(std::string channel_type) const
{
/*
* Translation table to map FCurve animation types to Collada animation.
diff --git a/source/blender/io/collada/AnimationExporter.h b/source/blender/io/collada/AnimationExporter.h
index 48279b0c867..ded547949f9 100644
--- a/source/blender/io/collada/AnimationExporter.h
+++ b/source/blender/io/collada/AnimationExporter.h
@@ -239,7 +239,7 @@ class AnimationExporter : COLLADASW::LibraryAnimations {
bool *has_tangents);
std::string get_axis_name(std::string channel, int id);
- const std::string get_collada_name(std::string channel_target) const;
+ std::string get_collada_name(std::string channel_target) const;
std::string get_collada_sid(const BCAnimationCurve &curve, const std::string axis_name);
/* ===================================== */
diff --git a/source/blender/io/collada/AnimationImporter.cpp b/source/blender/io/collada/AnimationImporter.cpp
index 1dada68293e..08d9386cb42 100644
--- a/source/blender/io/collada/AnimationImporter.cpp
+++ b/source/blender/io/collada/AnimationImporter.cpp
@@ -977,7 +977,7 @@ void AnimationImporter::apply_matrix_curves(Object *ob,
* If both values are specified, then the aspect ration is simply xfov/yfov
* and if aspect ratio is defined, then .. well then its that one.
*/
-static const double get_aspect_ratio(const COLLADAFW::Camera *camera)
+static double get_aspect_ratio(const COLLADAFW::Camera *camera)
{
double aspect = camera->getAspectRatio().getValue();
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());
}
diff --git a/source/blender/io/collada/BCAnimationCurve.h b/source/blender/io/collada/BCAnimationCurve.h
index 779678bca1d..3f7bcf9a13f 100644
--- a/source/blender/io/collada/BCAnimationCurve.h
+++ b/source/blender/io/collada/BCAnimationCurve.h
@@ -62,13 +62,13 @@ class BCCurveKey {
const int array_index,
const int subindex = -1);
void operator=(const BCCurveKey &other);
- const std::string get_full_path() const;
- const std::string get_path() const;
- const int get_array_index() const;
- const int get_subindex() const;
+ std::string get_full_path() const;
+ std::string get_path() const;
+ int get_array_index() const;
+ int get_subindex() const;
void set_object_type(BC_animation_type object_type);
- const BC_animation_type get_animation_type() const;
- const bool operator<(const BCCurveKey &other) const;
+ BC_animation_type get_animation_type() const;
+ bool operator<(const BCCurveKey &other) const;
};
class BCBezTriple {
@@ -76,10 +76,10 @@ class BCBezTriple {
BezTriple &bezt;
BCBezTriple(BezTriple &bezt);
- const float get_frame() const;
- const float get_time(Scene *scene) const;
- const float get_value() const;
- const float get_angle() const;
+ float get_frame() const;
+ float get_time(Scene *scene) const;
+ float get_value() const;
+ float get_angle() const;
void get_in_tangent(Scene *scene, float point[2], bool as_angle) const;
void get_out_tangent(Scene *scene, float point[2], bool as_angle) const;
void get_tangent(Scene *scene, float point[2], bool as_angle, int index) const;
@@ -108,26 +108,26 @@ class BCAnimationCurve {
BCAnimationCurve(BCCurveKey key, Object *ob, FCurve *fcu);
~BCAnimationCurve();
- const bool is_of_animation_type(BC_animation_type type) const;
- const int get_interpolation_type(float sample_frame) const;
+ bool is_of_animation_type(BC_animation_type type) const;
+ int get_interpolation_type(float sample_frame) const;
bool is_animated();
- const bool is_transform_curve() const;
- const bool is_rotation_curve() const;
+ bool is_transform_curve() const;
+ bool is_rotation_curve() const;
bool is_keyframe(int frame);
void adjust_range(int frame);
- const std::string get_animation_name(Object *ob) const; /* xxx: this is collada specific */
- const std::string get_channel_target() const;
- const std::string get_channel_type() const;
- const std::string get_channel_posebone() const; // returns "" if channel is not a bone channel
+ std::string get_animation_name(Object *ob) const; /* xxx: this is collada specific */
+ std::string get_channel_target() const;
+ std::string get_channel_type() const;
+ std::string get_channel_posebone() const; // returns "" if channel is not a bone channel
- const int get_channel_index() const;
- const int get_subindex() const;
- const std::string get_rna_path() const;
- const FCurve *get_fcurve() const;
- const int sample_count() const;
+ int get_channel_index() const;
+ int get_subindex() const;
+ std::string get_rna_path() const;
+ FCurve *get_fcurve() const;
+ int sample_count() const;
- const float get_value(const float frame);
+ float get_value(const float frame);
void get_values(BCValues &values) const;
void get_value_map(BCValueMap &value_map);
@@ -141,8 +141,8 @@ class BCAnimationCurve {
void clean_handles();
/* experimental stuff */
- const int closest_index_above(const float sample_frame, const int start_at) const;
- const int closest_index_below(const float sample_frame) const;
+ int closest_index_above(const float sample_frame, const int start_at) const;
+ int closest_index_below(const float sample_frame) const;
};
typedef std::map<BCCurveKey, BCAnimationCurve *> BCAnimationCurveMap;
diff --git a/source/blender/io/collada/BCAnimationSampler.cpp b/source/blender/io/collada/BCAnimationSampler.cpp
index 6f363aa76c2..a27bb10f705 100644
--- a/source/blender/io/collada/BCAnimationSampler.cpp
+++ b/source/blender/io/collada/BCAnimationSampler.cpp
@@ -549,13 +549,13 @@ const BCMatrix *BCSampleFrame::get_sample_matrix(Object *ob, Bone *bone) const
}
/* Check if the key is in this BCSampleFrame */
-const bool BCSampleFrame::has_sample_for(Object *ob) const
+bool BCSampleFrame::has_sample_for(Object *ob) const
{
return sampleMap.find(ob) != sampleMap.end();
}
/* Check if the Bone is in this BCSampleFrame */
-const bool BCSampleFrame::has_sample_for(Object *ob, Bone *bone) const
+bool BCSampleFrame::has_sample_for(Object *ob, Bone *bone) const
{
const BCMatrix *bc_bone = get_sample_matrix(ob, bone);
return bc_bone;
@@ -582,7 +582,7 @@ BCSampleFrame *BCSampleFrameContainer::get_frame(int frame_index)
}
/* Return a list of all frames that need to be sampled */
-const int BCSampleFrameContainer::get_frames(std::vector<int> &frames) const
+int BCSampleFrameContainer::get_frames(std::vector<int> &frames) const
{
frames.clear(); // safety;
BCSampleFrameMap::const_iterator it;
@@ -592,7 +592,7 @@ const int BCSampleFrameContainer::get_frames(std::vector<int> &frames) const
return frames.size();
}
-const int BCSampleFrameContainer::get_frames(Object *ob, BCFrames &frames) const
+int BCSampleFrameContainer::get_frames(Object *ob, BCFrames &frames) const
{
frames.clear(); // safety;
BCSampleFrameMap::const_iterator it;
@@ -605,7 +605,7 @@ const int BCSampleFrameContainer::get_frames(Object *ob, BCFrames &frames) const
return frames.size();
}
-const int BCSampleFrameContainer::get_frames(Object *ob, Bone *bone, BCFrames &frames) const
+int BCSampleFrameContainer::get_frames(Object *ob, Bone *bone, BCFrames &frames) const
{
frames.clear(); // safety;
BCSampleFrameMap::const_iterator it;
@@ -618,7 +618,7 @@ const int BCSampleFrameContainer::get_frames(Object *ob, Bone *bone, BCFrames &f
return frames.size();
}
-const int BCSampleFrameContainer::get_samples(Object *ob, BCFrameSampleMap &samples) const
+int BCSampleFrameContainer::get_samples(Object *ob, BCFrameSampleMap &samples) const
{
samples.clear(); // safety;
BCSampleFrameMap::const_iterator it;
@@ -632,7 +632,7 @@ const int BCSampleFrameContainer::get_samples(Object *ob, BCFrameSampleMap &samp
return samples.size();
}
-const int BCSampleFrameContainer::get_matrices(Object *ob, BCMatrixSampleMap &samples) const
+int BCSampleFrameContainer::get_matrices(Object *ob, BCMatrixSampleMap &samples) const
{
samples.clear(); // safety;
BCSampleFrameMap::const_iterator it;
@@ -646,9 +646,7 @@ const int BCSampleFrameContainer::get_matrices(Object *ob, BCMatrixSampleMap &sa
return samples.size();
}
-const int BCSampleFrameContainer::get_matrices(Object *ob,
- Bone *bone,
- BCMatrixSampleMap &samples) const
+int BCSampleFrameContainer::get_matrices(Object *ob, Bone *bone, BCMatrixSampleMap &samples) const
{
samples.clear(); // safety;
BCSampleFrameMap::const_iterator it;
diff --git a/source/blender/io/collada/BCAnimationSampler.h b/source/blender/io/collada/BCAnimationSampler.h
index 5ab4be3722c..9c6eaf0a140 100644
--- a/source/blender/io/collada/BCAnimationSampler.h
+++ b/source/blender/io/collada/BCAnimationSampler.h
@@ -92,8 +92,8 @@ class BCSampleFrame {
const BCMatrix *get_sample_matrix(Object *ob) const;
const BCMatrix *get_sample_matrix(Object *ob, Bone *bone) const;
- const bool has_sample_for(Object *ob) const;
- const bool has_sample_for(Object *ob, Bone *bone) const;
+ bool has_sample_for(Object *ob) const;
+ bool has_sample_for(Object *ob, Bone *bone) const;
};
typedef std::map<int, BCSampleFrame> BCSampleFrameMap;
@@ -135,13 +135,13 @@ class BCSampleFrameContainer {
BCSample &add(Object *ob, int frame_index);
BCSampleFrame *get_frame(int frame_index); // returns NULL if frame does not exist
- const int get_frames(std::vector<int> &frames) const;
- const int get_frames(Object *ob, BCFrames &frames) const;
- const int get_frames(Object *ob, Bone *bone, BCFrames &frames) const;
+ int get_frames(std::vector<int> &frames) const;
+ int get_frames(Object *ob, BCFrames &frames) const;
+ int get_frames(Object *ob, Bone *bone, BCFrames &frames) const;
- const int get_samples(Object *ob, BCFrameSampleMap &samples) const;
- const int get_matrices(Object *ob, BCMatrixSampleMap &matrices) const;
- const int get_matrices(Object *ob, Bone *bone, BCMatrixSampleMap &bones) const;
+ int get_samples(Object *ob, BCFrameSampleMap &samples) const;
+ int get_matrices(Object *ob, BCMatrixSampleMap &matrices) const;
+ int get_matrices(Object *ob, Bone *bone, BCMatrixSampleMap &bones) const;
};
class BCAnimationSampler {
diff --git a/source/blender/io/collada/BCMath.cpp b/source/blender/io/collada/BCMath.cpp
index a03e2ad6488..9a42d1ba843 100644
--- a/source/blender/io/collada/BCMath.cpp
+++ b/source/blender/io/collada/BCMath.cpp
@@ -216,7 +216,7 @@ void BCMatrix::get_matrix(Matrix &mat,
}
}
-const bool BCMatrix::in_range(const BCMatrix &other, float distance) const
+bool BCMatrix::in_range(const BCMatrix &other, float distance) const
{
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
diff --git a/source/blender/io/collada/BCMath.h b/source/blender/io/collada/BCMath.h
index 79a0ea941cd..0b18b86a961 100644
--- a/source/blender/io/collada/BCMath.h
+++ b/source/blender/io/collada/BCMath.h
@@ -98,7 +98,7 @@ class BCMatrix {
void add_transform(const BCMatrix &matrix, const bool inverted = false);
void apply_transform(const BCMatrix &matrix, const bool inverted = false);
- const bool in_range(const BCMatrix &other, float distance) const;
+ bool in_range(const BCMatrix &other, float distance) const;
static void sanitize(Matrix &matrix, int precision);
static void sanitize(DMatrix &matrix, int precision);
diff --git a/source/blender/io/collada/BCSampleData.cpp b/source/blender/io/collada/BCSampleData.cpp
index 7e23a2de00f..f099e250565 100644
--- a/source/blender/io/collada/BCSampleData.cpp
+++ b/source/blender/io/collada/BCSampleData.cpp
@@ -40,7 +40,7 @@ void BCSample::add_bone_matrix(Bone *bone, Matrix &mat)
}
/* Get channel value */
-const bool BCSample::get_value(std::string channel_target, const int array_index, float *val) const
+bool BCSample::get_value(std::string channel_target, const int array_index, float *val) const
{
std::string bname = bc_string_before(channel_target, ".");
std::string channel_type = bc_string_after(channel_target, ".");
diff --git a/source/blender/io/collada/BCSampleData.h b/source/blender/io/collada/BCSampleData.h
index 39e34355b72..463c90ec00b 100644
--- a/source/blender/io/collada/BCSampleData.h
+++ b/source/blender/io/collada/BCSampleData.h
@@ -53,7 +53,7 @@ class BCSample {
void add_bone_matrix(Bone *bone, Matrix &mat);
- const bool get_value(std::string channel_target, const int array_index, float *val) const;
+ bool get_value(std::string channel_target, const int array_index, float *val) const;
const BCMatrix &get_matrix() const;
const BCMatrix *get_matrix(Bone *bone) const; // returns NULL if bone is not animated
};
diff --git a/source/blender/io/collada/MeshImporter.cpp b/source/blender/io/collada/MeshImporter.cpp
index 9fbb7324f8f..a0d0507d472 100644
--- a/source/blender/io/collada/MeshImporter.cpp
+++ b/source/blender/io/collada/MeshImporter.cpp
@@ -48,7 +48,7 @@
#include "collada_utils.h"
// get node name, or fall back to original id if not present (name is optional)
-template<class T> static const std::string bc_get_dae_name(T *node)
+template<class T> static std::string bc_get_dae_name(T *node)
{
return node->getName().empty() ? node->getOriginalId() : node->getName();
}