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/blenkernel/intern
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/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/attribute_access_intern.hh10
-rw-r--r--source/blender/blenkernel/intern/data_transfer_intern.h37
-rw-r--r--source/blender/blenkernel/intern/multires_reshape.h10
3 files changed, 27 insertions, 30 deletions
diff --git a/source/blender/blenkernel/intern/attribute_access_intern.hh b/source/blender/blenkernel/intern/attribute_access_intern.hh
index b77d7010efa..2cd128081eb 100644
--- a/source/blender/blenkernel/intern/attribute_access_intern.hh
+++ b/source/blender/blenkernel/intern/attribute_access_intern.hh
@@ -161,7 +161,7 @@ class CustomDataAttributeProvider final : public DynamicAttributesProvider {
bool try_create(GeometryComponent &component,
const AttributeIDRef &attribute_id,
- const AttributeDomain domain,
+ AttributeDomain domain,
const CustomDataType data_type,
const AttributeInit &initializer) const final;
@@ -185,8 +185,8 @@ class CustomDataAttributeProvider final : public DynamicAttributesProvider {
*/
class NamedLegacyCustomDataProvider final : public DynamicAttributesProvider {
private:
- using AsReadAttribute = GVArray (*)(const void *data, const int domain_size);
- using AsWriteAttribute = GVMutableArray (*)(void *data, const int domain_size);
+ using AsReadAttribute = GVArray (*)(const void *data, int domain_size);
+ using AsWriteAttribute = GVMutableArray (*)(void *data, int domain_size);
const AttributeDomain domain_;
const CustomDataType attribute_type_;
const CustomDataType stored_type_;
@@ -229,8 +229,8 @@ class NamedLegacyCustomDataProvider final : public DynamicAttributesProvider {
* if the stored type is the same as the attribute type.
*/
class BuiltinCustomDataLayerProvider final : public BuiltinAttributeProvider {
- using AsReadAttribute = GVArray (*)(const void *data, const int domain_size);
- using AsWriteAttribute = GVMutableArray (*)(void *data, const int domain_size);
+ using AsReadAttribute = GVArray (*)(const void *data, int domain_size);
+ using AsWriteAttribute = GVMutableArray (*)(void *data, int domain_size);
using UpdateOnRead = void (*)(const GeometryComponent &component);
using UpdateOnWrite = void (*)(GeometryComponent &component);
const CustomDataType stored_type_;
diff --git a/source/blender/blenkernel/intern/data_transfer_intern.h b/source/blender/blenkernel/intern/data_transfer_intern.h
index 5510f699197..e5218415df9 100644
--- a/source/blender/blenkernel/intern/data_transfer_intern.h
+++ b/source/blender/blenkernel/intern/data_transfer_intern.h
@@ -33,43 +33,40 @@ struct CustomData;
struct CustomDataTransferLayerMap;
struct ListBase;
-float data_transfer_interp_float_do(const int mix_mode,
- const float val_dst,
- const float val_src,
- const float mix_factor);
+float data_transfer_interp_float_do(int mix_mode, float val_dst, float val_src, float mix_factor);
void data_transfer_layersmapping_add_item(struct ListBase *r_map,
- const int data_type,
- const int mix_mode,
- const float mix_factor,
+ int data_type,
+ int mix_mode,
+ float mix_factor,
const float *mix_weights,
const void *data_src,
void *data_dst,
- const int data_src_n,
- const int data_dst_n,
+ int data_src_n,
+ int data_dst_n,
const size_t elem_size,
const size_t data_size,
const size_t data_offset,
- const uint64_t data_flag,
+ uint64_t data_flag,
cd_datatransfer_interp interp,
void *interp_data);
/* Type-specific. */
bool data_transfer_layersmapping_vgroups(struct ListBase *r_map,
- const int mix_mode,
- const float mix_factor,
+ int mix_mode,
+ float mix_factor,
const float *mix_weights,
- const int num_elem_dst,
- const bool use_create,
- const bool use_delete,
+ int num_elem_dst,
+ bool use_create,
+ bool use_delete,
struct Object *ob_src,
struct Object *ob_dst,
struct CustomData *cd_src,
struct CustomData *cd_dst,
- const bool use_dupref_dst,
- const int fromlayers,
- const int tolayers);
+ bool use_dupref_dst,
+ int fromlayers,
+ int tolayers);
/* Defined in customdata.c */
@@ -80,8 +77,8 @@ void customdata_data_transfer_interp_normal_normals(const CustomDataTransferLaye
void *data_dst,
const void **sources,
const float *weights,
- const int count,
- const float mix_factor);
+ int count,
+ float mix_factor);
#ifdef __cplusplus
}
diff --git a/source/blender/blenkernel/intern/multires_reshape.h b/source/blender/blenkernel/intern/multires_reshape.h
index db419418998..8a37d0ea785 100644
--- a/source/blender/blenkernel/intern/multires_reshape.h
+++ b/source/blender/blenkernel/intern/multires_reshape.h
@@ -225,8 +225,8 @@ GridCoord multires_reshape_ptex_coord_to_grid(const MultiresReshapeContext *resh
* Is calculated for the given surface derivatives at a given base face corner.
*/
void multires_reshape_tangent_matrix_for_corner(const MultiresReshapeContext *reshape_context,
- const int face_index,
- const int corner,
+ int face_index,
+ int corner,
const float dPdu[3],
const float dPdv[3],
float r_tangent_matrix[3][3]);
@@ -266,7 +266,7 @@ void multires_reshape_evaluate_limit_at_grid(const MultiresReshapeContext *resha
/**
* Make sure custom data is allocated for the given level.
*/
-void multires_reshape_ensure_grids(struct Mesh *mesh, const int level);
+void multires_reshape_ensure_grids(struct Mesh *mesh, int level);
/* --------------------------------------------------------------------
* Functions specific to reshaping from a set of vertices in a object position.
@@ -283,7 +283,7 @@ void multires_reshape_ensure_grids(struct Mesh *mesh, const int level);
bool multires_reshape_assign_final_coords_from_vertcos(
const MultiresReshapeContext *reshape_context,
const float (*vert_coords)[3],
- const int num_vert_coords);
+ int num_vert_coords);
/* --------------------------------------------------------------------
* Functions specific to reshaping from CCG.
@@ -338,7 +338,7 @@ void multires_reshape_smooth_object_grids_with_details(
* Makes it so surface on top level looks smooth. Details are not preserved
*/
void multires_reshape_smooth_object_grids(const MultiresReshapeContext *reshape_context,
- const enum eMultiresSubdivideModeType mode);
+ enum eMultiresSubdivideModeType mode);
/* --------------------------------------------------------------------
* Displacement, space conversion.