diff options
author | Campbell Barton <campbell@blender.org> | 2022-01-07 03:38:08 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-01-07 06:16:26 +0300 |
commit | 3d3bc748849834ef74563deb603ab43859cffeeb (patch) | |
tree | de74ce4722b2cb032c22dbc090a15dd2e172c29b /source/blender/python/generic | |
parent | bb69c19f08ac681d4386325e4318ebfbef2e9531 (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/python/generic')
-rw-r--r-- | source/blender/python/generic/py_capi_utils.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/source/blender/python/generic/py_capi_utils.h b/source/blender/python/generic/py_capi_utils.h index f6d8d7298af..604792389fa 100644 --- a/source/blender/python/generic/py_capi_utils.h +++ b/source/blender/python/generic/py_capi_utils.h @@ -73,7 +73,7 @@ int PyC_AsArray_Multi_FAST(void *array, const size_t array_item_size, PyObject *value_fast, const int *dims, - const int dims_len, + int dims_len, const PyTypeObject *type, const char *error_prefix); @@ -81,7 +81,7 @@ int PyC_AsArray_Multi(void *array, const size_t array_item_size, PyObject *value, const int *dims, - const int dims_len, + int dims_len, const PyTypeObject *type, const char *error_prefix); @@ -102,10 +102,10 @@ PyObject *PyC_Tuple_PackArray_Bool(const bool *array, uint len); #define PyC_Tuple_Pack_Bool(...) \ PyC_Tuple_PackArray_Bool(((const bool[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__)) -PyObject *PyC_Tuple_PackArray_Multi_F32(const float *array, const int dims[], const int dims_len); -PyObject *PyC_Tuple_PackArray_Multi_F64(const double *array, const int dims[], const int dims_len); -PyObject *PyC_Tuple_PackArray_Multi_I32(const int *array, const int dims[], const int dims_len); -PyObject *PyC_Tuple_PackArray_Multi_Bool(const bool *array, const int dims[], const int dims_len); +PyObject *PyC_Tuple_PackArray_Multi_F32(const float *array, const int dims[], int dims_len); +PyObject *PyC_Tuple_PackArray_Multi_F64(const double *array, const int dims[], int dims_len); +PyObject *PyC_Tuple_PackArray_Multi_I32(const int *array, const int dims[], int dims_len); +PyObject *PyC_Tuple_PackArray_Multi_Bool(const bool *array, const int dims[], int dims_len); /** * Caller needs to ensure tuple is uninitialized. @@ -219,8 +219,7 @@ struct PyC_StringEnum { * Use with PyArg_ParseTuple's "O&" formatting. */ int PyC_ParseStringEnum(PyObject *o, void *p); -const char *PyC_StringEnum_FindIDFromValue(const struct PyC_StringEnumItems *items, - const int value); +const char *PyC_StringEnum_FindIDFromValue(const struct PyC_StringEnumItems *items, int value); int PyC_CheckArgs_DeepCopy(PyObject *args); |