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:
authorCampbell Barton <campbell@blender.org>2022-01-07 03:38:08 +0300
committerCampbell Barton <campbell@blender.org>2022-01-07 06:16:26 +0300
commit3d3bc748849834ef74563deb603ab43859cffeeb (patch)
treede74ce4722b2cb032c22dbc090a15dd2e172c29b /source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh
parentbb69c19f08ac681d4386325e4318ebfbef2e9531 (diff)
Cleanup: remove redundant const qualifiers for POD types
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
Diffstat (limited to 'source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh')
-rw-r--r--source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh34
1 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh b/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh
index 5d9c08a288e..9a4dfe3efe3 100644
--- a/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh
+++ b/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh
@@ -106,12 +106,12 @@ class OBJMesh : NonCopyable {
/**
* Return mat_nr-th material of the object. The given index should be zero-based.
*/
- const Material *get_object_material(const int16_t mat_nr) const;
+ const Material *get_object_material(int16_t mat_nr) const;
/**
* Returns a zero-based index of a polygon's material indexing into
* the Object's material slots.
*/
- int16_t ith_poly_matnr(const int poly_index) const;
+ int16_t ith_poly_matnr(int poly_index) const;
void ensure_mesh_normals() const;
void ensure_mesh_edges() const;
@@ -120,12 +120,12 @@ class OBJMesh : NonCopyable {
* Calculate smooth groups of a smooth-shaded object.
* \return A polygon aligned array of smooth group numbers.
*/
- void calc_smooth_groups(const bool use_bitflags);
+ void calc_smooth_groups(bool use_bitflags);
/**
* \return Smooth group of the polygon at the given index.
*/
- int ith_smooth_group(const int poly_index) const;
- bool is_ith_poly_smooth(const int poly_index) const;
+ int ith_smooth_group(int poly_index) const;
+ bool is_ith_poly_smooth(int poly_index) const;
/**
* Get object name as it appears in the outliner.
@@ -138,42 +138,42 @@ class OBJMesh : NonCopyable {
/**
* Get object's material (at the given index) name. The given index should be zero-based.
*/
- const char *get_object_material_name(const int16_t mat_nr) const;
+ const char *get_object_material_name(int16_t mat_nr) const;
/**
* Calculate coordinates of the vertex at the given index.
*/
- float3 calc_vertex_coords(const int vert_index, const float scaling_factor) const;
+ float3 calc_vertex_coords(int vert_index, float scaling_factor) const;
/**
* Calculate vertex indices of all vertices of the polygon at the given index.
*/
- Vector<int> calc_poly_vertex_indices(const int poly_index) const;
+ Vector<int> calc_poly_vertex_indices(int poly_index) const;
/**
* Calculate UV vertex coordinates of an Object.
*
* \note Also store the UV vertex indices in the member variable.
*/
void store_uv_coords_and_indices(Vector<std::array<float, 2>> &r_uv_coords);
- Span<int> calc_poly_uv_indices(const int poly_index) const;
+ Span<int> calc_poly_uv_indices(int poly_index) const;
/**
* Calculate polygon normal of a polygon at given index.
*
* Should be used for flat-shaded polygons.
*/
- float3 calc_poly_normal(const int poly_index) const;
+ float3 calc_poly_normal(int poly_index) const;
/**
* Calculate a polygon's polygon/loop normal indices.
* \param object_tot_prev_normals Number of normals of this Object written so far.
* \return Number of distinct normal indices.
*/
- std::pair<int, Vector<int>> calc_poly_normal_indices(const int poly_index,
- const int object_tot_prev_normals) const;
+ std::pair<int, Vector<int>> calc_poly_normal_indices(int poly_index,
+ int object_tot_prev_normals) const;
/**
* Calculate loop normals of a polygon at the given index.
*
* Should be used for smooth-shaded polygons.
*/
- void calc_loop_normals(const int poly_index, Vector<float3> &r_loop_normals) const;
+ void calc_loop_normals(int poly_index, Vector<float3> &r_loop_normals) const;
/**
* Find the index of the vertex group with the maximum number of vertices in a polygon.
* The index indices into the #Object.defbase.
@@ -181,17 +181,17 @@ class OBJMesh : NonCopyable {
* If two or more groups have the same number of vertices (maximum), group name depends on the
* implementation of #std::max_element.
*/
- int16_t get_poly_deform_group_index(const int poly_index) const;
+ int16_t get_poly_deform_group_index(int poly_index) const;
/**
* Find the name of the vertex deform group at the given index.
* The index indices into the #Object.defbase.
*/
- const char *get_poly_deform_group_name(const int16_t def_group_index) const;
+ const char *get_poly_deform_group_name(int16_t def_group_index) const;
/**
* Calculate vertex indices of an edge's corners if it is a loose edge.
*/
- std::optional<std::array<int, 2>> calc_loose_edge_vert_indices(const int edge_index) const;
+ std::optional<std::array<int, 2>> calc_loose_edge_vert_indices(int edge_index) const;
private:
/**
@@ -208,6 +208,6 @@ class OBJMesh : NonCopyable {
/**
* Set the final transform after applying axes settings and an Object's world transform.
*/
- void set_world_axes_transform(const eTransformAxisForward forward, const eTransformAxisUp up);
+ void set_world_axes_transform(eTransformAxisForward forward, eTransformAxisUp up);
};
} // namespace blender::io::obj