[Bf-blender-cvs] [8057ab10db5] master: Cleanup: Clang-Tidy readability-const-return-type fixes

Sybren A. Stüvel noreply at git.blender.org
Fri Sep 4 12:04:53 CEST 2020


Commit: 8057ab10db5945db18ccb45265b91ce120ae0be5
Author: Sybren A. Stüvel
Date:   Fri Sep 4 12:04:47 2020 +0200
Branches: master
https://developer.blender.org/rB8057ab10db5945db18ccb45265b91ce120ae0be5

Cleanup: Clang-Tidy readability-const-return-type fixes

No functional changes.

===================================================================

M	.clang-tidy
M	source/blender/blenkernel/intern/volume.cc
M	source/blender/freestyle/intern/stroke/Curve.cpp
M	source/blender/freestyle/intern/stroke/Curve.h
M	source/blender/freestyle/intern/view_map/Silhouette.cpp
M	source/blender/freestyle/intern/view_map/Silhouette.h
M	source/blender/io/alembic/exporter/abc_writer_abstract.h
M	source/blender/io/alembic/exporter/abc_writer_camera.cc
M	source/blender/io/alembic/exporter/abc_writer_camera.h
M	source/blender/io/alembic/exporter/abc_writer_curves.cc
M	source/blender/io/alembic/exporter/abc_writer_curves.h
M	source/blender/io/alembic/exporter/abc_writer_hair.cc
M	source/blender/io/alembic/exporter/abc_writer_hair.h
M	source/blender/io/alembic/exporter/abc_writer_mesh.cc
M	source/blender/io/alembic/exporter/abc_writer_mesh.h
M	source/blender/io/alembic/exporter/abc_writer_nurbs.cc
M	source/blender/io/alembic/exporter/abc_writer_nurbs.h
M	source/blender/io/alembic/exporter/abc_writer_points.cc
M	source/blender/io/alembic/exporter/abc_writer_points.h
M	source/blender/io/alembic/exporter/abc_writer_transform.cc
M	source/blender/io/alembic/exporter/abc_writer_transform.h
M	source/blender/io/collada/AnimationExporter.cpp
M	source/blender/io/collada/AnimationExporter.h
M	source/blender/io/collada/AnimationImporter.cpp
M	source/blender/io/collada/BCAnimationCurve.cpp
M	source/blender/io/collada/BCAnimationCurve.h
M	source/blender/io/collada/BCAnimationSampler.cpp
M	source/blender/io/collada/BCAnimationSampler.h
M	source/blender/io/collada/BCMath.cpp
M	source/blender/io/collada/BCMath.h
M	source/blender/io/collada/BCSampleData.cpp
M	source/blender/io/collada/BCSampleData.h
M	source/blender/io/collada/MeshImporter.cpp

===================================================================

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_obje

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list