[Bf-blender-cvs] [0f29f2c3e63] master: Cleanup: remove redundant const qualifiers for scalar & enum types
Campbell Barton
noreply at git.blender.org
Wed Jun 1 07:49:45 CEST 2022
Commit: 0f29f2c3e630a9f092bf02fd4669d27aef4b5921
Author: Campbell Barton
Date: Wed Jun 1 15:06:21 2022 +1000
Branches: master
https://developer.blender.org/rB0f29f2c3e630a9f092bf02fd4669d27aef4b5921
Cleanup: remove redundant const qualifiers for scalar & enum types
===================================================================
M source/blender/blenkernel/BKE_attribute.h
M source/blender/blenkernel/BKE_attribute_access.hh
M source/blender/blenkernel/BKE_customdata.h
M source/blender/blenkernel/BKE_geometry_fields.hh
M source/blender/blenkernel/BKE_geometry_set.hh
M source/blender/blenkernel/BKE_lib_remap.h
M source/blender/editors/include/BIF_glutil.h
M source/blender/gpencil_modifiers/intern/MOD_gpencil_util.h
M source/blender/imbuf/IMB_colormanagement.h
M source/blender/imbuf/intern/IMB_filetype.h
M source/blender/imbuf/intern/openexr/openexr_api.h
M source/blender/nodes/NOD_geometry_exec.hh
M source/blender/render/RE_pipeline.h
M source/blender/render/RE_texture_margin.h
M source/blender/sequencer/SEQ_channels.h
===================================================================
diff --git a/source/blender/blenkernel/BKE_attribute.h b/source/blender/blenkernel/BKE_attribute.h
index 2985e7cd0b2..78edb6b95ed 100644
--- a/source/blender/blenkernel/BKE_attribute.h
+++ b/source/blender/blenkernel/BKE_attribute.h
@@ -64,13 +64,13 @@ bool BKE_id_attribute_remove(struct ID *id,
struct CustomDataLayer *BKE_id_attribute_find(const struct ID *id,
const char *name,
- const int type,
- const eAttrDomain domain);
+ int type,
+ eAttrDomain domain);
struct CustomDataLayer *BKE_id_attribute_search(const struct ID *id,
const char *name,
- const eCustomDataMask type,
- const eAttrDomainMask domain_mask);
+ eCustomDataMask type,
+ eAttrDomainMask domain_mask);
eAttrDomain BKE_id_attribute_domain(const struct ID *id, const struct CustomDataLayer *layer);
int BKE_id_attribute_data_length(struct ID *id, struct CustomDataLayer *layer);
diff --git a/source/blender/blenkernel/BKE_attribute_access.hh b/source/blender/blenkernel/BKE_attribute_access.hh
index d7826a0e17a..fef91d6f75d 100644
--- a/source/blender/blenkernel/BKE_attribute_access.hh
+++ b/source/blender/blenkernel/BKE_attribute_access.hh
@@ -376,7 +376,7 @@ class CustomDataAttributes {
* value for the type will be used.
*/
blender::GVArray get_for_read(const AttributeIDRef &attribute_id,
- const eCustomDataType data_type,
+ eCustomDataType data_type,
const void *default_value) const;
template<typename T>
@@ -389,10 +389,8 @@ class CustomDataAttributes {
}
std::optional<blender::GMutableSpan> get_for_write(const AttributeIDRef &attribute_id);
- bool create(const AttributeIDRef &attribute_id, const eCustomDataType data_type);
- bool create_by_move(const AttributeIDRef &attribute_id,
- const eCustomDataType data_type,
- void *buffer);
+ bool create(const AttributeIDRef &attribute_id, eCustomDataType data_type);
+ bool create_by_move(const AttributeIDRef &attribute_id, eCustomDataType data_type, void *buffer);
bool remove(const AttributeIDRef &attribute_id);
/**
diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h
index 0e3e427d7ab..993ab476830 100644
--- a/source/blender/blenkernel/BKE_customdata.h
+++ b/source/blender/blenkernel/BKE_customdata.h
@@ -749,7 +749,7 @@ void CustomData_debug_info_from_layers(const struct CustomData *data,
# include "BLI_cpp_type.hh"
namespace blender::bke {
-const CPPType *custom_data_type_to_cpp_type(const eCustomDataType type);
+const CPPType *custom_data_type_to_cpp_type(eCustomDataType type);
eCustomDataType cpp_type_to_custom_data_type(const CPPType &type);
} // namespace blender::bke
#endif
diff --git a/source/blender/blenkernel/BKE_geometry_fields.hh b/source/blender/blenkernel/BKE_geometry_fields.hh
index 8478a9d7464..7c504826044 100644
--- a/source/blender/blenkernel/BKE_geometry_fields.hh
+++ b/source/blender/blenkernel/BKE_geometry_fields.hh
@@ -104,7 +104,7 @@ VArray<float3> curve_normals_varray(const CurveComponent &component, const eAttr
VArray<float3> mesh_normals_varray(const MeshComponent &mesh_component,
const Mesh &mesh,
const IndexMask mask,
- const eAttrDomain domain);
+ eAttrDomain domain);
class NormalFieldInput : public GeometryFieldInput {
public:
diff --git a/source/blender/blenkernel/BKE_geometry_set.hh b/source/blender/blenkernel/BKE_geometry_set.hh
index 04e467b2ff1..8d658c9be15 100644
--- a/source/blender/blenkernel/BKE_geometry_set.hh
+++ b/source/blender/blenkernel/BKE_geometry_set.hh
@@ -157,7 +157,7 @@ class GeometryComponent {
/** Returns true when the attribute has been created. */
bool attribute_try_create(const blender::bke::AttributeIDRef &attribute_id,
eAttrDomain domain,
- const eCustomDataType data_type,
+ eCustomDataType data_type,
const AttributeInit &initializer);
/**
@@ -183,7 +183,7 @@ class GeometryComponent {
*/
blender::GVArray attribute_try_get_for_read(const blender::bke::AttributeIDRef &attribute_id,
eAttrDomain domain,
- const eCustomDataType data_type) const;
+ eCustomDataType data_type) const;
/**
* Get a virtual array that refers to the data of an attribute, interpolated to the given domain.
@@ -199,7 +199,7 @@ class GeometryComponent {
* cannot be converted.
*/
blender::bke::ReadAttributeLookup attribute_try_get_for_read(
- const blender::bke::AttributeIDRef &attribute_id, const eCustomDataType data_type) const;
+ const blender::bke::AttributeIDRef &attribute_id, eCustomDataType data_type) const;
/**
* Get a virtual array that refers to the data of an attribute, interpolated to the given domain
@@ -208,7 +208,7 @@ class GeometryComponent {
*/
blender::GVArray attribute_get_for_read(const blender::bke::AttributeIDRef &attribute_id,
eAttrDomain domain,
- const eCustomDataType data_type,
+ eCustomDataType data_type,
const void *default_value = nullptr) const;
/* Use instead of the method above when the type is known at compile time for type safety. */
template<typename T>
@@ -235,7 +235,7 @@ class GeometryComponent {
blender::bke::OutputAttribute attribute_try_get_for_output(
const blender::bke::AttributeIDRef &attribute_id,
eAttrDomain domain,
- const eCustomDataType data_type,
+ eCustomDataType data_type,
const void *default_value = nullptr);
/* Use instead of the method above when the type is known at compile time for type safety. */
template<typename T>
@@ -258,7 +258,7 @@ class GeometryComponent {
blender::bke::OutputAttribute attribute_try_get_for_output_only(
const blender::bke::AttributeIDRef &attribute_id,
eAttrDomain domain,
- const eCustomDataType data_type);
+ eCustomDataType data_type);
/* Use instead of the method above when the type is known at compile time for type safety. */
template<typename T>
blender::bke::OutputAttribute_Typed<T> attribute_try_get_for_output_only(
diff --git a/source/blender/blenkernel/BKE_lib_remap.h b/source/blender/blenkernel/BKE_lib_remap.h
index f62225179bd..37b626fb4da 100644
--- a/source/blender/blenkernel/BKE_lib_remap.h
+++ b/source/blender/blenkernel/BKE_lib_remap.h
@@ -95,11 +95,11 @@ typedef enum eIDRemapType {
*/
void BKE_libblock_remap_multiple_locked(struct Main *bmain,
struct IDRemapper *mappings,
- const short remap_flags);
+ short remap_flags);
void BKE_libblock_remap_multiple(struct Main *bmain,
struct IDRemapper *mappings,
- const short remap_flags);
+ short remap_flags);
/**
* Replace all references in given Main to \a old_id by \a new_id
@@ -142,9 +142,9 @@ void BKE_libblock_relink_ex(struct Main *bmain,
*/
void BKE_libblock_relink_multiple(struct Main *bmain,
struct LinkNode *ids,
- const eIDRemapType remap_type,
+ eIDRemapType remap_type,
struct IDRemapper *id_remapper,
- const short remap_flags);
+ short remap_flags);
/**
* Remaps ID usages of given ID to their `id->newid` pointer if not None, and proceeds recursively
diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h
index 3f1b8d6ecda..84512653a24 100644
--- a/source/blender/editors/include/BIF_glutil.h
+++ b/source/blender/editors/include/BIF_glutil.h
@@ -55,17 +55,17 @@ IMMDrawPixelsTexState immDrawPixelsTexSetup(int builtin);
* finished.
*/
void immDrawPixelsTexScaledFullSize(const IMMDrawPixelsTexState *state,
- const float x,
- const float y,
- const int img_w,
- const int img_h,
- const eGPUTextureFormat gpu_format,
- const bool use_filter,
+ float x,
+ float y,
+ int img_w,
+ int img_h,
+ eGPUTextureFormat gpu_format,
+ bool use_filter,
const void *rect,
- const float scaleX,
- const float scaleY,
- const float xzoom,
- const float yzoom,
+ float scaleX,
+ float scaleY,
+ float xzoom,
+ float yzoom,
const float color[4]);
/**
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.h b/source/blender/gpencil_modifiers/intern/MOD_gpencil_ut
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list