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.
This commit is contained in:
2022-01-07 11:38:08 +11:00
parent bb69c19f08
commit 3d3bc74884
373 changed files with 3058 additions and 3644 deletions

View File

@@ -37,14 +37,14 @@ typedef struct {
/* prototypes */
PyObject *Euler_CreatePyObject(const float eul[3],
const short order,
short order,
PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT;
PyObject *Euler_CreatePyObject_wrap(float eul[3],
const short order,
short order,
PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL(1);
PyObject *Euler_CreatePyObject_cb(PyObject *cb_user,
const short order,
short order,
unsigned char cb_type,
unsigned char cb_subtype) ATTR_WARN_UNUSED_RESULT;

View File

@@ -61,17 +61,17 @@ typedef struct {
/* prototypes */
PyObject *Matrix_CreatePyObject(const float *mat,
const ushort num_col,
const ushort num_row,
ushort num_col,
ushort num_row,
PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT;
PyObject *Matrix_CreatePyObject_wrap(float *mat,
const ushort num_col,
const ushort num_row,
ushort num_col,
ushort num_row,
PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL(1);
PyObject *Matrix_CreatePyObject_cb(PyObject *user,
const unsigned short num_col,
const unsigned short num_row,
unsigned short num_col,
unsigned short num_row,
unsigned char cb_type,
unsigned char cb_subtype) ATTR_WARN_UNUSED_RESULT;
@@ -79,8 +79,8 @@ PyObject *Matrix_CreatePyObject_cb(PyObject *user,
* \param mat: Initialized matrix value to use in-place, allocated with #PyMem_Malloc
*/
PyObject *Matrix_CreatePyObject_alloc(float *mat,
const ushort num_col,
const ushort num_row,
ushort num_col,
ushort num_row,
PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT;
/* PyArg_ParseTuple's "O&" formatting helpers. */

View File

@@ -33,7 +33,7 @@ typedef struct {
/*prototypes*/
PyObject *Vector_CreatePyObject(const float *vec,
const int size,
int size,
PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT;
/**
* Create a vector that wraps existing memory.
@@ -41,7 +41,7 @@ PyObject *Vector_CreatePyObject(const float *vec,
* \param vec: Use this vector in-place.
*/
PyObject *Vector_CreatePyObject_wrap(float *vec,
const int size,
int size,
PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL(1);
/**
@@ -56,6 +56,6 @@ PyObject *Vector_CreatePyObject_cb(PyObject *user,
* \param vec: Initialized vector value to use in-place, allocated with #PyMem_Malloc
*/
PyObject *Vector_CreatePyObject_alloc(float *vec,
const int size,
int size,
PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL(1);