diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-03-27 13:50:18 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-03-27 16:23:31 +0300 |
commit | 13358d049e2de813d4dc83c41c3f87f5fae3c3a1 (patch) | |
tree | 43f0dcdb9dd1afe8e4178f3a697f4e34a944d03a /source/blender/freestyle/intern/python | |
parent | 2ada3512a27eb66d05da669268dc3bb2cd0a1e16 (diff) |
Freestyle: Code cleanup, prepare for strict C++ flags
Diffstat (limited to 'source/blender/freestyle/intern/python')
10 files changed, 41 insertions, 41 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp b/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp index ad54a81f156..50d82656819 100644 --- a/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp +++ b/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp @@ -46,7 +46,7 @@ static char ContextFunctions_get_time_stamp___doc__[] = " :rtype: int\n"; static PyObject * -ContextFunctions_get_time_stamp(PyObject *self) +ContextFunctions_get_time_stamp(PyObject * /*self*/) { return PyLong_FromLong(ContextFunctions::GetTimeStampCF()); } @@ -60,7 +60,7 @@ static char ContextFunctions_get_canvas_width___doc__[] = " :rtype: int\n"; static PyObject * -ContextFunctions_get_canvas_width(PyObject *self) +ContextFunctions_get_canvas_width(PyObject * /*self*/) { return PyLong_FromLong(ContextFunctions::GetCanvasWidthCF()); } @@ -74,7 +74,7 @@ static char ContextFunctions_get_canvas_height___doc__[] = " :rtype: int\n"; static PyObject * -ContextFunctions_get_canvas_height(PyObject *self) +ContextFunctions_get_canvas_height(PyObject * /*self*/) { return PyLong_FromLong(ContextFunctions::GetCanvasHeightCF()); } @@ -88,7 +88,7 @@ static char ContextFunctions_get_border___doc__[] = " :rtype: tuple\n"; static PyObject * -ContextFunctions_get_border(PyObject *self) +ContextFunctions_get_border(PyObject * /*self*/) { BBox<Vec2i> border(ContextFunctions::GetBorderCF()); PyObject *v = PyTuple_New(4); @@ -117,7 +117,7 @@ static char ContextFunctions_load_map___doc__[] = " :type sigma: float\n"; static PyObject * -ContextFunctions_load_map(PyObject *self, PyObject *args, PyObject *kwds) +ContextFunctions_load_map(PyObject * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"file_name", "map_name", "num_levels", "sigma", NULL}; char *fileName, *mapName; @@ -150,7 +150,7 @@ static char ContextFunctions_read_map_pixel___doc__[] = " :rtype: float\n"; static PyObject * -ContextFunctions_read_map_pixel(PyObject *self, PyObject *args, PyObject *kwds) +ContextFunctions_read_map_pixel(PyObject * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"map_name", "level", "x", "y", NULL}; char *mapName; @@ -180,7 +180,7 @@ static char ContextFunctions_read_complete_view_map_pixel___doc__[] = " :rtype: float\n"; static PyObject * -ContextFunctions_read_complete_view_map_pixel(PyObject *self, PyObject *args, PyObject *kwds) +ContextFunctions_read_complete_view_map_pixel(PyObject * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"level", "x", "y", NULL}; int level; @@ -212,7 +212,7 @@ static char ContextFunctions_read_directional_view_map_pixel___doc__[] = " :rtype: float\n"; static PyObject * -ContextFunctions_read_directional_view_map_pixel(PyObject *self, PyObject *args, PyObject *kwds) +ContextFunctions_read_directional_view_map_pixel(PyObject * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"orientation", "level", "x", "y", NULL}; int orientation, level; @@ -232,7 +232,7 @@ static char ContextFunctions_get_selected_fedge___doc__[] = " :rtype: :class:`FEdge`\n"; static PyObject * -ContextFunctions_get_selected_fedge(PyObject *self) +ContextFunctions_get_selected_fedge(PyObject * /*self*/) { FEdge *fe = ContextFunctions::GetSelectedFEdgeCF(); if (fe) diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp index 487a473b7bd..d22632040f4 100644 --- a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp +++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp @@ -72,7 +72,7 @@ static char Freestyle_getCurrentScene___doc__[] = " :return: The current scene.\n" " :rtype: :class:`bpy.types.Scene`\n"; -static PyObject *Freestyle_getCurrentScene(PyObject *self) +static PyObject *Freestyle_getCurrentScene(PyObject * /*self*/) { if (!freestyle_scene) { PyErr_SetString(PyExc_TypeError, "current scene not available"); @@ -126,7 +126,7 @@ static char Freestyle_blendRamp___doc__[] = " :return: Blended color in RGB format.\n" " :rtype: :class:`mathutils.Vector`\n"; -static PyObject *Freestyle_blendRamp(PyObject *self, PyObject *args) +static PyObject *Freestyle_blendRamp(PyObject * /*self*/, PyObject *args) { PyObject *obj1, *obj2; char *s; @@ -170,7 +170,7 @@ static char Freestyle_evaluateColorRamp___doc__[] = " :return: color in RGBA format.\n" " :rtype: :class:`mathutils.Vector`\n"; -static PyObject *Freestyle_evaluateColorRamp(PyObject *self, PyObject *args) +static PyObject *Freestyle_evaluateColorRamp(PyObject * /*self*/, PyObject *args) { BPy_StructRNA *py_srna; ColorBand *coba; @@ -207,7 +207,7 @@ static char Freestyle_evaluateCurveMappingF___doc__[] = " :return: Mapped output value.\n" " :rtype: float\n"; -static PyObject *Freestyle_evaluateCurveMappingF(PyObject *self, PyObject *args) +static PyObject *Freestyle_evaluateCurveMappingF(PyObject * /*self*/, PyObject *args) { BPy_StructRNA *py_srna; CurveMapping *cumap; diff --git a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp index 7a3624f248e..0db25753caa 100644 --- a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp +++ b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp @@ -63,7 +63,7 @@ PyDoc_STRVAR(Integrator_integrate_doc, " :class:`UnaryFunction0DUnsigned` type.\n" " :rtype: int or float"); -static PyObject * Integrator_integrate(PyObject *self, PyObject *args, PyObject *kwds) +static PyObject * Integrator_integrate(PyObject * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"func", "it", "it_end", "integration_type", NULL}; PyObject *obj1, *obj4 = 0; diff --git a/source/blender/freestyle/intern/python/BPy_Operators.cpp b/source/blender/freestyle/intern/python/BPy_Operators.cpp index 57ec15f4150..a214fc444c7 100644 --- a/source/blender/freestyle/intern/python/BPy_Operators.cpp +++ b/source/blender/freestyle/intern/python/BPy_Operators.cpp @@ -76,7 +76,7 @@ PyDoc_STRVAR(Operators_select_doc, " :arg pred: The predicate expressing this condition.\n" " :type pred: :class:`UnaryPredicate1D`"); -static PyObject *Operators_select(BPy_Operators *self, PyObject *args, PyObject *kwds) +static PyObject *Operators_select(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"pred", NULL}; PyObject *obj = 0; @@ -135,7 +135,7 @@ PyDoc_STRVAR(Operators_chain_doc, " stopping condition.\n" " :type pred: :class:`UnaryPredicate1D`"); -static PyObject *Operators_chain(BPy_Operators *self, PyObject *args, PyObject *kwds) +static PyObject *Operators_chain(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"it", "pred", "modifier", NULL}; PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0; @@ -224,7 +224,7 @@ PyDoc_STRVAR(Operators_bidirectional_chain_doc, " contains the chaining rule.\n" " :type it: :class:`ChainingIterator`"); -static PyObject *Operators_bidirectional_chain(BPy_Operators *self, PyObject *args, PyObject *kwds) +static PyObject *Operators_bidirectional_chain(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"it", "pred", NULL}; PyObject *obj1 = 0, *obj2 = 0; @@ -304,7 +304,7 @@ PyDoc_STRVAR(Operators_sequential_split_doc, " resolution.)\n" " :type sampling: float"); -static PyObject *Operators_sequential_split(BPy_Operators *self, PyObject *args, PyObject *kwds) +static PyObject *Operators_sequential_split(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist_1[] = {"starting_pred", "stopping_pred", "sampling", NULL}; static const char *kwlist_2[] = {"pred", "sampling", NULL}; @@ -411,7 +411,7 @@ PyDoc_STRVAR(Operators_recursive_split_doc, " resolution.)\n" " :type sampling: float"); -static PyObject *Operators_recursive_split(BPy_Operators *self, PyObject *args, PyObject *kwds) +static PyObject *Operators_recursive_split(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist_1[] = {"func", "pred_1d", "sampling", NULL}; static const char *kwlist_2[] = {"func", "pred_0d", "pred_1d", "sampling", NULL}; @@ -486,7 +486,7 @@ PyDoc_STRVAR(Operators_sort_doc, " :arg pred: The binary predicate used for the comparison.\n" " :type pred: :class:`BinaryPredicate1D`"); -static PyObject *Operators_sort(BPy_Operators *self, PyObject *args, PyObject *kwds) +static PyObject *Operators_sort(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"pred", NULL}; PyObject *obj = 0; @@ -517,7 +517,7 @@ PyDoc_STRVAR(Operators_create_doc, " :arg shaders: The list of shaders used to shade the strokes.\n" " :type shaders: list of :class:`StrokeShader` objects"); -static PyObject *Operators_create(BPy_Operators *self, PyObject *args, PyObject *kwds) +static PyObject *Operators_create(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"pred", "shaders", NULL}; PyObject *obj1 = 0, *obj2 = 0; @@ -558,7 +558,7 @@ PyDoc_STRVAR(Operators_reset_doc, " :arg delete_strokes: Delete the strokes that are currently stored.\n" " :type delete_strokes: bool\n"); -static PyObject *Operators_reset(BPy_Operators *self, PyObject *args, PyObject *kwds) +static PyObject *Operators_reset(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"delete_strokes", NULL}; PyObject *obj1 = 0; @@ -583,7 +583,7 @@ PyDoc_STRVAR(Operators_get_viewedge_from_index_doc, " :return: The ViewEdge object.\n" " :rtype: :class:`ViewEdge`"); -static PyObject *Operators_get_viewedge_from_index(BPy_Operators *self, PyObject *args, PyObject *kwds) +static PyObject *Operators_get_viewedge_from_index(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"i", NULL}; unsigned int i; @@ -607,7 +607,7 @@ PyDoc_STRVAR(Operators_get_chain_from_index_doc, " :return: The Chain object.\n" " :rtype: :class:`Chain`"); -static PyObject *Operators_get_chain_from_index(BPy_Operators *self, PyObject *args, PyObject *kwds) +static PyObject *Operators_get_chain_from_index(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"i", NULL}; unsigned int i; @@ -631,7 +631,7 @@ PyDoc_STRVAR(Operators_get_stroke_from_index_doc, " :return: The Stroke object.\n" " :rtype: :class:`Stroke`"); -static PyObject *Operators_get_stroke_from_index(BPy_Operators *self, PyObject *args, PyObject *kwds) +static PyObject *Operators_get_stroke_from_index(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"i", NULL}; unsigned int i; @@ -653,7 +653,7 @@ PyDoc_STRVAR(Operators_get_view_edges_size_doc, " :return: The number of ViewEdges.\n" " :rtype: int"); -static PyObject *Operators_get_view_edges_size(BPy_Operators *self) +static PyObject *Operators_get_view_edges_size(BPy_Operators * /*self*/) { return PyLong_FromLong(Operators::getViewEdgesSize()); } @@ -666,7 +666,7 @@ PyDoc_STRVAR(Operators_get_chains_size_doc, " :return: The number of Chains.\n" " :rtype: int"); -static PyObject *Operators_get_chains_size(BPy_Operators *self) +static PyObject *Operators_get_chains_size(BPy_Operators * /*self*/) { return PyLong_FromLong(Operators::getChainsSize()); } @@ -679,7 +679,7 @@ PyDoc_STRVAR(Operators_get_strokes_size_doc, " :return: The number of Strokes.\n" " :rtype: int"); -static PyObject *Operators_get_strokes_size(BPy_Operators *self) +static PyObject *Operators_get_strokes_size(BPy_Operators * /*self*/) { return PyLong_FromLong(Operators::getStrokesSize()); } diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp index be20febba2b..0941efe9df5 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp @@ -93,7 +93,7 @@ static void UnaryFunction0D___dealloc__(BPy_UnaryFunction0D *self) Py_TYPE(self)->tp_free((PyObject *)self); } -static PyObject *UnaryFunction0D___repr__(BPy_UnaryFunction0D *self) +static PyObject *UnaryFunction0D___repr__(BPy_UnaryFunction0D * /*self*/) { return PyUnicode_FromString("UnaryFunction0D"); } diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp index b88d609e48d..1b82c7777c7 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp @@ -87,7 +87,7 @@ static void UnaryFunction1D___dealloc__(BPy_UnaryFunction1D *self) Py_TYPE(self)->tp_free((PyObject *)self); } -static PyObject *UnaryFunction1D___repr__(BPy_UnaryFunction1D *self) +static PyObject *UnaryFunction1D___repr__(BPy_UnaryFunction1D * /*self*/) { return PyUnicode_FromString("UnaryFunction1D"); } diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp index 5e2130ac8e7..f8d0b34d6a9 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp @@ -49,7 +49,7 @@ PyDoc_STRVAR(ViewVertex_doc, "Thus, this class can be specialized into two classes, the\n" ":class:`TVertex` class and the :class:`NonTVertex` class."); -static int ViewVertex_init(BPy_ViewVertex *self, PyObject *args, PyObject *kwds) +static int ViewVertex_init(BPy_ViewVertex * /*self*/, PyObject * /*args*/, PyObject * /*kwds*/) { PyErr_SetString(PyExc_TypeError, "cannot instantiate abstract class"); return -1; @@ -82,7 +82,7 @@ PyDoc_STRVAR(ViewVertex_edges_end_doc, " :return: An orientedViewEdgeIterator pointing after the last ViewEdge.\n" " :rtype: :class:`orientedViewEdgeIterator`"); -static PyObject *ViewVertex_edges_end(BPy_ViewVertex *self) +static PyObject *ViewVertex_edges_end(BPy_ViewVertex * /*self*/) { #if 0 ViewVertexInternal::orientedViewEdgeIterator ove_it(self->vv->edgesEnd()); diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp index ae4fe0764b6..ba773d4f4cf 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp @@ -166,7 +166,7 @@ static int StrokeVertex_mathutils_check(BaseMathObject *bmo) return 0; } -static int StrokeVertex_mathutils_get(BaseMathObject *bmo, int subtype) +static int StrokeVertex_mathutils_get(BaseMathObject *bmo, int /*subtype*/) { BPy_StrokeVertex *self = (BPy_StrokeVertex *)bmo->cb_user; bmo->data[0] = (float)self->sv->x(); @@ -174,7 +174,7 @@ static int StrokeVertex_mathutils_get(BaseMathObject *bmo, int subtype) return 0; } -static int StrokeVertex_mathutils_set(BaseMathObject *bmo, int subtype) +static int StrokeVertex_mathutils_set(BaseMathObject *bmo, int /*subtype*/) { BPy_StrokeVertex *self = (BPy_StrokeVertex *)bmo->cb_user; self->sv->setX((real)bmo->data[0]); @@ -182,7 +182,7 @@ static int StrokeVertex_mathutils_set(BaseMathObject *bmo, int subtype) return 0; } -static int StrokeVertex_mathutils_get_index(BaseMathObject *bmo, int subtype, int index) +static int StrokeVertex_mathutils_get_index(BaseMathObject *bmo, int /*subtype*/, int index) { BPy_StrokeVertex *self = (BPy_StrokeVertex *)bmo->cb_user; switch (index) { @@ -194,7 +194,7 @@ static int StrokeVertex_mathutils_get_index(BaseMathObject *bmo, int subtype, in return 0; } -static int StrokeVertex_mathutils_set_index(BaseMathObject *bmo, int subtype, int index) +static int StrokeVertex_mathutils_set_index(BaseMathObject *bmo, int /*subtype*/, int index) { BPy_StrokeVertex *self = (BPy_StrokeVertex *)bmo->cb_user; switch (index) { diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp index 7592508902b..4c9e0630d40 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp @@ -100,7 +100,7 @@ static int FEdge_init(BPy_FEdge *self, PyObject *args, PyObject *kwds) /*----------------------FEdge sequence protocol ----------------------------*/ -static Py_ssize_t FEdge_sq_length(BPy_FEdge *self) +static Py_ssize_t FEdge_sq_length(BPy_FEdge * /*self*/) { return 2; } diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp index a2079c7d685..cf893ad9481 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp @@ -99,7 +99,7 @@ static int FEdgeSmooth_mathutils_check(BaseMathObject *bmo) return 0; } -static int FEdgeSmooth_mathutils_get(BaseMathObject *bmo, int subtype) +static int FEdgeSmooth_mathutils_get(BaseMathObject *bmo, int /*subtype*/) { BPy_FEdgeSmooth *self = (BPy_FEdgeSmooth *)bmo->cb_user; Vec3r p(self->fes->normal()); @@ -109,7 +109,7 @@ static int FEdgeSmooth_mathutils_get(BaseMathObject *bmo, int subtype) return 0; } -static int FEdgeSmooth_mathutils_set(BaseMathObject *bmo, int subtype) +static int FEdgeSmooth_mathutils_set(BaseMathObject *bmo, int /*subtype*/) { BPy_FEdgeSmooth *self = (BPy_FEdgeSmooth *)bmo->cb_user; Vec3r p(bmo->data[0], bmo->data[1], bmo->data[2]); @@ -117,7 +117,7 @@ static int FEdgeSmooth_mathutils_set(BaseMathObject *bmo, int subtype) return 0; } -static int FEdgeSmooth_mathutils_get_index(BaseMathObject *bmo, int subtype, int index) +static int FEdgeSmooth_mathutils_get_index(BaseMathObject *bmo, int /*subtype*/, int index) { BPy_FEdgeSmooth *self = (BPy_FEdgeSmooth *)bmo->cb_user; Vec3r p(self->fes->normal()); @@ -125,7 +125,7 @@ static int FEdgeSmooth_mathutils_get_index(BaseMathObject *bmo, int subtype, int return 0; } -static int FEdgeSmooth_mathutils_set_index(BaseMathObject *bmo, int subtype, int index) +static int FEdgeSmooth_mathutils_set_index(BaseMathObject *bmo, int /*subtype*/, int index) { BPy_FEdgeSmooth *self = (BPy_FEdgeSmooth *)bmo->cb_user; Vec3r p(self->fes->normal()); |