Cleanup: quiet ignored qualifier & unused warnings

This commit is contained in:
Campbell Barton
2025-07-17 12:30:39 +10:00
parent c034c928fe
commit fc07a4d45e
11 changed files with 39 additions and 51 deletions

View File

@@ -62,8 +62,8 @@ public:
virtual const e_vector& getWy() const {return m_Wy;}; virtual const e_vector& getWy() const {return m_Wy;};
virtual const unsigned int getNrOfCoordinates(){return m_nq;}; virtual unsigned int getNrOfCoordinates(){return m_nq;};
virtual const unsigned int getNrOfConstraints(){return m_nc;}; virtual unsigned int getNrOfConstraints(){return m_nc;};
}; };
} }

View File

@@ -39,8 +39,8 @@ public:
(void)end_effector; (void)end_effector;
return m_internalPose; return m_internalPose;
}; };
virtual const ObjectType getType(){return m_type;}; virtual ObjectType getType(){return m_type;};
virtual const unsigned int getNrOfCoordinates(){return 0;}; virtual unsigned int getNrOfCoordinates(){return 0;};
virtual void updateKinematics(const Timestamp& /*timestamp*/)=0; virtual void updateKinematics(const Timestamp& /*timestamp*/)=0;
virtual void pushCache(const Timestamp& /*timestamp*/)=0; virtual void pushCache(const Timestamp& /*timestamp*/)=0;
virtual void initCache(Cache * /*cache*/) = 0; virtual void initCache(Cache * /*cache*/) = 0;

View File

@@ -28,8 +28,8 @@ public:
virtual const e_matrix& getJu(unsigned int frameIndex) const; virtual const e_matrix& getJu(unsigned int frameIndex) const;
virtual const e_vector& getXudot() const {return m_xudot;} virtual const e_vector& getXudot() const {return m_xudot;}
virtual void updateCoordinates(const Timestamp& timestamp)=0; virtual void updateCoordinates(const Timestamp& timestamp)=0;
virtual const unsigned int getNrOfCoordinates(){return m_nu;}; virtual unsigned int getNrOfCoordinates(){return m_nu;};
virtual const unsigned int getNrOfFrames(){return m_nf;}; virtual unsigned int getNrOfFrames(){return m_nf;};
}; };

View File

@@ -59,25 +59,25 @@ class FrsMaterial {
} }
/** Returns the red component of the line color */ /** Returns the red component of the line color */
inline const float lineR() const inline float lineR() const
{ {
return Line[0]; return Line[0];
} }
/** Returns the green component of the line color */ /** Returns the green component of the line color */
inline const float lineG() const inline float lineG() const
{ {
return Line[1]; return Line[1];
} }
/** Returns the blue component of the line color */ /** Returns the blue component of the line color */
inline const float lineB() const inline float lineB() const
{ {
return Line[2]; return Line[2];
} }
/** Returns the alpha component of the line color */ /** Returns the alpha component of the line color */
inline const float lineA() const inline float lineA() const
{ {
return Line[3]; return Line[3];
} }
@@ -89,25 +89,25 @@ class FrsMaterial {
} }
/** Returns the red component of the diffuse color */ /** Returns the red component of the diffuse color */
inline const float diffuseR() const inline float diffuseR() const
{ {
return Diffuse[0]; return Diffuse[0];
} }
/** Returns the green component of the diffuse color */ /** Returns the green component of the diffuse color */
inline const float diffuseG() const inline float diffuseG() const
{ {
return Diffuse[1]; return Diffuse[1];
} }
/** Returns the blue component of the diffuse color */ /** Returns the blue component of the diffuse color */
inline const float diffuseB() const inline float diffuseB() const
{ {
return Diffuse[2]; return Diffuse[2];
} }
/** Returns the alpha component of the diffuse color */ /** Returns the alpha component of the diffuse color */
inline const float diffuseA() const inline float diffuseA() const
{ {
return Diffuse[3]; return Diffuse[3];
} }
@@ -119,25 +119,25 @@ class FrsMaterial {
} }
/** Returns the red component of the specular color */ /** Returns the red component of the specular color */
inline const float specularR() const inline float specularR() const
{ {
return Specular[0]; return Specular[0];
} }
/** Returns the green component of the specular color */ /** Returns the green component of the specular color */
inline const float specularG() const inline float specularG() const
{ {
return Specular[1]; return Specular[1];
} }
/** Returns the blue component of the specular color */ /** Returns the blue component of the specular color */
inline const float specularB() const inline float specularB() const
{ {
return Specular[2]; return Specular[2];
} }
/** Returns the alpha component of the specular color */ /** Returns the alpha component of the specular color */
inline const float specularA() const inline float specularA() const
{ {
return Specular[3]; return Specular[3];
} }
@@ -149,25 +149,25 @@ class FrsMaterial {
} }
/** Returns the red component of the ambient color */ /** Returns the red component of the ambient color */
inline const float ambientR() const inline float ambientR() const
{ {
return Ambient[0]; return Ambient[0];
} }
/** Returns the green component of the ambient color */ /** Returns the green component of the ambient color */
inline const float ambientG() const inline float ambientG() const
{ {
return Ambient[1]; return Ambient[1];
} }
/** Returns the blue component of the ambient color */ /** Returns the blue component of the ambient color */
inline const float ambientB() const inline float ambientB() const
{ {
return Ambient[2]; return Ambient[2];
} }
/** Returns the alpha component of the ambient color */ /** Returns the alpha component of the ambient color */
inline const float ambientA() const inline float ambientA() const
{ {
return Ambient[3]; return Ambient[3];
} }
@@ -179,37 +179,37 @@ class FrsMaterial {
} }
/** Returns the red component of the emissive color */ /** Returns the red component of the emissive color */
inline const float emissionR() const inline float emissionR() const
{ {
return Emission[0]; return Emission[0];
} }
/** Returns the green component of the emissive color */ /** Returns the green component of the emissive color */
inline const float emissionG() const inline float emissionG() const
{ {
return Emission[1]; return Emission[1];
} }
/** Returns the blue component of the emissive color */ /** Returns the blue component of the emissive color */
inline const float emissionB() const inline float emissionB() const
{ {
return Emission[2]; return Emission[2];
} }
/** Returns the alpha component of the emissive color */ /** Returns the alpha component of the emissive color */
inline const float emissionA() const inline float emissionA() const
{ {
return Emission[3]; return Emission[3];
} }
/** Returns the shininess coefficient */ /** Returns the shininess coefficient */
inline const float shininess() const inline float shininess() const
{ {
return Shininess; return Shininess;
} }
/** Returns the line color priority */ /** Returns the line color priority */
inline const int priority() const inline int priority() const
{ {
return Priority; return Priority;
} }

View File

@@ -98,19 +98,19 @@ class StrokeAttribute {
} }
/** Returns the R color component. */ /** Returns the R color component. */
inline const float getColorR() const inline float getColorR() const
{ {
return _color[0]; return _color[0];
} }
/** Returns the G color component. */ /** Returns the G color component. */
inline const float getColorG() const inline float getColorG() const
{ {
return _color[1]; return _color[1];
} }
/** Returns the B color component. */ /** Returns the B color component. */
inline const float getColorB() const inline float getColorB() const
{ {
return _color[2]; return _color[2];
} }
@@ -137,13 +137,13 @@ class StrokeAttribute {
} }
/** Returns the thickness on the right of the vertex when following the stroke. */ /** Returns the thickness on the right of the vertex when following the stroke. */
inline const float getThicknessR() const inline float getThicknessR() const
{ {
return _thickness[0]; return _thickness[0];
} }
/** Returns the thickness on the left of the vertex when following the stroke. */ /** Returns the thickness on the left of the vertex when following the stroke. */
inline const float getThicknessL() const inline float getThicknessL() const
{ {
return _thickness[1]; return _thickness[1];
} }

View File

@@ -865,7 +865,7 @@ class FEdge : public Interface1D {
const SShape *shape() const; const SShape *shape() const;
float shape_importance() const; float shape_importance() const;
inline const int qi() const inline int qi() const
{ {
return invisibility(); return invisibility();
} }

View File

@@ -1301,7 +1301,7 @@ class ViewEdge : public Interface1D {
inline const SShape *occluded_shape() const; inline const SShape *occluded_shape() const;
inline const bool occludee_empty() const inline bool occludee_empty() const
{ {
if (_aShape == 0) { if (_aShape == 0) {
return true; return true;

View File

@@ -1213,7 +1213,7 @@ static void merge_out_faces(Vector<OutFace> &faces)
} }
/** Return true if the ponts p0, p1, p2 are approximately in a straight line. */ /** Return true if the ponts p0, p1, p2 are approximately in a straight line. */
static inline const bool approx_in_line(const float3 &p0, const float3 &p1, const float3 &p2) static inline bool approx_in_line(const float3 &p0, const float3 &p1, const float3 &p2)
{ {
float cos_ang = math::dot(math::normalize(p1 - p0), math::normalize(p2 - p1)); float cos_ang = math::dot(math::normalize(p1 - p0), math::normalize(p2 - p1));
return math::abs(cos_ang - 1.0) < 1e-4; return math::abs(cos_ang - 1.0) < 1e-4;

View File

@@ -136,6 +136,8 @@ static bool can_use_mesh_for_orco_evaluation(MeshSeqCacheModifierData *mcmd,
{ {
return true; return true;
} }
# else
UNUSED_VARS(frame_offset);
# endif # endif
break; break;
case CACHE_FILE_TYPE_INVALID: case CACHE_FILE_TYPE_INVALID:

View File

@@ -140,20 +140,6 @@ PyDoc_STRVAR(
"Accessor for skin layer.\n" "Accessor for skin layer.\n"
"\n" "\n"
":type: :class:`BMLayerCollection` of :class:`bmesh.types.BMVertSkin`"); ":type: :class:`BMLayerCollection` of :class:`bmesh.types.BMVertSkin`");
#ifdef WITH_FREESTYLE
PyDoc_STRVAR(
/* Wrap. */
bpy_bmlayeraccess_collection__freestyle_edge_doc,
"Accessor for Freestyle edge layer.\n"
"\n"
":type: :class:`BMLayerCollection`");
PyDoc_STRVAR(
/* Wrap. */
bpy_bmlayeraccess_collection__freestyle_face_doc,
"Accessor for Freestyle face layer.\n"
"\n"
":type: :class:`BMLayerCollection`");
#endif
static PyObject *bpy_bmlayeraccess_collection_get(BPy_BMLayerAccess *self, void *flag) static PyObject *bpy_bmlayeraccess_collection_get(BPy_BMLayerAccess *self, void *flag)
{ {

View File

@@ -33,7 +33,7 @@ struct FinalImageCache {
int view_id; int view_id;
int display_channel; int display_channel;
const uint64_t hash() const uint64_t hash() const
{ {
return get_default_hash(seqbasep, timeline_frame, view_id, display_channel); return get_default_hash(seqbasep, timeline_frame, view_id, display_channel);
} }