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/makesrna/RNA_access.h
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/makesrna/RNA_access.h')
-rw-r--r--source/blender/makesrna/RNA_access.h95
1 files changed, 38 insertions, 57 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index 7fa7405add1..92e2e426262 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -777,7 +777,7 @@ bool RNA_pointer_is_null(const PointerRNA *ptr);
bool RNA_path_resolved_create(PointerRNA *ptr,
struct PropertyRNA *prop,
- const int prop_index,
+ int prop_index,
PathResolvedRNA *r_anim_rna);
void RNA_blender_rna_pointer_create(PointerRNA *r_ptr);
@@ -937,13 +937,11 @@ void RNA_property_float_ui_range(PointerRNA *ptr,
int RNA_property_float_clamp(PointerRNA *ptr, PropertyRNA *prop, float *value);
int RNA_property_int_clamp(PointerRNA *ptr, PropertyRNA *prop, int *value);
-bool RNA_enum_identifier(const EnumPropertyItem *item, const int value, const char **identifier);
-int RNA_enum_bitflag_identifiers(const EnumPropertyItem *item,
- const int value,
- const char **identifier);
-bool RNA_enum_name(const EnumPropertyItem *item, const int value, const char **r_name);
-bool RNA_enum_description(const EnumPropertyItem *item, const int value, const char **description);
-int RNA_enum_from_value(const EnumPropertyItem *item, const int value);
+bool RNA_enum_identifier(const EnumPropertyItem *item, int value, const char **identifier);
+int RNA_enum_bitflag_identifiers(const EnumPropertyItem *item, int value, const char **identifier);
+bool RNA_enum_name(const EnumPropertyItem *item, int value, const char **r_name);
+bool RNA_enum_description(const EnumPropertyItem *item, int value, const char **description);
+int RNA_enum_from_value(const EnumPropertyItem *item, int value);
int RNA_enum_from_identifier(const EnumPropertyItem *item, const char *identifier);
/**
* Take care using this with translated enums,
@@ -955,7 +953,7 @@ unsigned int RNA_enum_items_count(const EnumPropertyItem *item);
void RNA_property_enum_items_ex(struct bContext *C,
PointerRNA *ptr,
PropertyRNA *prop,
- const bool use_static,
+ bool use_static,
const EnumPropertyItem **r_item,
int *r_totitem,
bool *r_free);
@@ -979,32 +977,20 @@ void RNA_property_enum_items_gettexted_all(struct bContext *C,
bool *r_free);
bool RNA_property_enum_value(
struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, const char *identifier, int *r_value);
-bool RNA_property_enum_identifier(struct bContext *C,
- PointerRNA *ptr,
- PropertyRNA *prop,
- const int value,
- const char **identifier);
+bool RNA_property_enum_identifier(
+ struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, int value, const char **identifier);
bool RNA_property_enum_name(
- struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **name);
+ struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, int value, const char **name);
bool RNA_property_enum_name_gettexted(
- struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **name);
+ struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, int value, const char **name);
-bool RNA_property_enum_item_from_value(struct bContext *C,
- PointerRNA *ptr,
- PropertyRNA *prop,
- const int value,
- EnumPropertyItem *r_item);
-bool RNA_property_enum_item_from_value_gettexted(struct bContext *C,
- PointerRNA *ptr,
- PropertyRNA *prop,
- const int value,
- EnumPropertyItem *r_item);
-
-int RNA_property_enum_bitflag_identifiers(struct bContext *C,
- PointerRNA *ptr,
- PropertyRNA *prop,
- const int value,
- const char **identifier);
+bool RNA_property_enum_item_from_value(
+ struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, int value, EnumPropertyItem *r_item);
+bool RNA_property_enum_item_from_value_gettexted(
+ struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, int value, EnumPropertyItem *r_item);
+
+int RNA_property_enum_bitflag_identifiers(
+ struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, int value, const char **identifier);
StructRNA *RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop);
bool RNA_property_pointer_poll(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *value);
@@ -1035,9 +1021,7 @@ bool RNA_property_overridable_get(PointerRNA *ptr, PropertyRNA *prop);
/**
* Should only be used for custom properties.
*/
-bool RNA_property_overridable_library_set(PointerRNA *ptr,
- PropertyRNA *prop,
- const bool is_overridable);
+bool RNA_property_overridable_library_set(PointerRNA *ptr, PropertyRNA *prop, bool is_overridable);
bool RNA_property_overridden(PointerRNA *ptr, PropertyRNA *prop);
bool RNA_property_comparable(PointerRNA *ptr, PropertyRNA *prop);
/**
@@ -1156,7 +1140,7 @@ int RNA_property_collection_lookup_string_index(
*/
int RNA_property_collection_assign_int(PointerRNA *ptr,
PropertyRNA *prop,
- const int key,
+ int key,
const PointerRNA *assign_ptr);
bool RNA_property_collection_type_get(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *r_ptr);
@@ -1557,22 +1541,19 @@ char *RNA_pointer_as_string(struct bContext *C,
*/
char *RNA_pointer_as_string_keywords_ex(struct bContext *C,
PointerRNA *ptr,
- const bool as_function,
- const bool all_args,
- const bool nested_args,
- const int max_prop_length,
+ bool as_function,
+ bool all_args,
+ bool nested_args,
+ int max_prop_length,
PropertyRNA *iterprop);
char *RNA_pointer_as_string_keywords(struct bContext *C,
PointerRNA *ptr,
- const bool as_function,
- const bool all_args,
- const bool nested_args,
- const int max_prop_length);
-char *RNA_function_as_string_keywords(struct bContext *C,
- FunctionRNA *func,
- const bool as_function,
- const bool all_args,
- const int max_prop_length);
+ bool as_function,
+ bool all_args,
+ bool nested_args,
+ int max_prop_length);
+char *RNA_function_as_string_keywords(
+ struct bContext *C, FunctionRNA *func, bool as_function, bool all_args, int max_prop_length);
/* Function */
@@ -1762,7 +1743,7 @@ bool RNA_struct_override_matches(struct Main *bmain,
const char *root_path,
const size_t root_path_len,
struct IDOverrideLibrary *override,
- const eRNAOverrideMatch flags,
+ eRNAOverrideMatch flags,
eRNAOverrideMatchResult *r_report_flags);
/**
@@ -1793,7 +1774,7 @@ void RNA_struct_override_apply(struct Main *bmain,
struct PointerRNA *ptr_src,
struct PointerRNA *ptr_storage,
struct IDOverrideLibrary *override,
- const eRNAOverrideApplyFlag flag);
+ eRNAOverrideApplyFlag flag);
struct IDOverrideLibraryProperty *RNA_property_override_property_find(struct Main *bmain,
PointerRNA *ptr,
@@ -1808,23 +1789,23 @@ struct IDOverrideLibraryPropertyOperation *RNA_property_override_property_operat
struct Main *bmain,
PointerRNA *ptr,
PropertyRNA *prop,
- const int index,
- const bool strict,
+ int index,
+ bool strict,
bool *r_strict);
struct IDOverrideLibraryPropertyOperation *RNA_property_override_property_operation_get(
struct Main *bmain,
PointerRNA *ptr,
PropertyRNA *prop,
- const short operation,
- const int index,
- const bool strict,
+ short operation,
+ int index,
+ bool strict,
bool *r_strict,
bool *r_created);
eRNAOverrideStatus RNA_property_override_library_status(struct Main *bmainm,
PointerRNA *ptr,
PropertyRNA *prop,
- const int index);
+ int index);
void RNA_struct_state_owner_set(const char *name);
const char *RNA_struct_state_owner_get(void);