Cleanup: replace UNUSED macro with commented args in C++ code

This is the conventional way of dealing with unused arguments in C++,
since it works on all compilers.

Regex find and replace: `UNUSED\((\w+)\)` -> `/*$1*/`
This commit is contained in:
Hans Goudey
2022-10-03 17:37:25 -05:00
parent ed7f5713f8
commit 97746129d5
601 changed files with 2305 additions and 2443 deletions

View File

@@ -265,13 +265,13 @@ PyDoc_STRVAR(SVertex_point_3d_doc,
"\n"
":type: :class:`mathutils.Vector`");
static PyObject *SVertex_point_3d_get(BPy_SVertex *self, void *UNUSED(closure))
static PyObject *SVertex_point_3d_get(BPy_SVertex *self, void * /*closure*/)
{
return Vector_CreatePyObject_cb(
(PyObject *)self, 3, SVertex_mathutils_cb_index, MATHUTILS_SUBTYPE_POINT3D);
}
static int SVertex_point_3d_set(BPy_SVertex *self, PyObject *value, void *UNUSED(closure))
static int SVertex_point_3d_set(BPy_SVertex *self, PyObject *value, void * /*closure*/)
{
float v[3];
if (mathutils_array_parse(v, 3, 3, value, "value must be a 3-dimensional vector") == -1) {
@@ -287,13 +287,13 @@ PyDoc_STRVAR(SVertex_point_2d_doc,
"\n"
":type: :class:`mathutils.Vector`");
static PyObject *SVertex_point_2d_get(BPy_SVertex *self, void *UNUSED(closure))
static PyObject *SVertex_point_2d_get(BPy_SVertex *self, void * /*closure*/)
{
return Vector_CreatePyObject_cb(
(PyObject *)self, 3, SVertex_mathutils_cb_index, MATHUTILS_SUBTYPE_POINT2D);
}
static int SVertex_point_2d_set(BPy_SVertex *self, PyObject *value, void *UNUSED(closure))
static int SVertex_point_2d_set(BPy_SVertex *self, PyObject *value, void * /*closure*/)
{
float v[3];
if (mathutils_array_parse(v, 3, 3, value, "value must be a 3-dimensional vector") == -1) {
@@ -309,13 +309,13 @@ PyDoc_STRVAR(SVertex_id_doc,
"\n"
":type: :class:`Id`");
static PyObject *SVertex_id_get(BPy_SVertex *self, void *UNUSED(closure))
static PyObject *SVertex_id_get(BPy_SVertex *self, void * /*closure*/)
{
Id id(self->sv->getId());
return BPy_Id_from_Id(id); // return a copy
}
static int SVertex_id_set(BPy_SVertex *self, PyObject *value, void *UNUSED(closure))
static int SVertex_id_set(BPy_SVertex *self, PyObject *value, void * /*closure*/)
{
if (!BPy_Id_Check(value)) {
PyErr_SetString(PyExc_TypeError, "value must be an Id");
@@ -332,7 +332,7 @@ PyDoc_STRVAR(SVertex_normals_doc,
"\n"
":type: list of :class:`mathutils.Vector` objects");
static PyObject *SVertex_normals_get(BPy_SVertex *self, void *UNUSED(closure))
static PyObject *SVertex_normals_get(BPy_SVertex *self, void * /*closure*/)
{
PyObject *py_normals;
set<Vec3r> normals = self->sv->normals();
@@ -352,7 +352,7 @@ PyDoc_STRVAR(SVertex_normals_size_doc,
"\n"
":type: int");
static PyObject *SVertex_normals_size_get(BPy_SVertex *self, void *UNUSED(closure))
static PyObject *SVertex_normals_size_get(BPy_SVertex *self, void * /*closure*/)
{
return PyLong_FromLong(self->sv->normalsSize());
}
@@ -363,7 +363,7 @@ PyDoc_STRVAR(SVertex_viewvertex_doc,
"\n"
":type: :class:`ViewVertex`");
static PyObject *SVertex_viewvertex_get(BPy_SVertex *self, void *UNUSED(closure))
static PyObject *SVertex_viewvertex_get(BPy_SVertex *self, void * /*closure*/)
{
ViewVertex *vv = self->sv->viewvertex();
if (vv) {
@@ -385,7 +385,7 @@ PyDoc_STRVAR(SVertex_curvatures_doc,
"\n"
":type: tuple");
static PyObject *SVertex_curvatures_get(BPy_SVertex *self, void *UNUSED(closure))
static PyObject *SVertex_curvatures_get(BPy_SVertex *self, void * /*closure*/)
{
const CurvatureInfo *info = self->sv->getCurvatureInfo();
if (!info) {