[Bf-blender-cvs] [13358d0] master: Freestyle: Code cleanup, prepare for strict C++ flags

Sergey Sharybin noreply at git.blender.org
Fri Mar 27 14:24:02 CET 2015


Commit: 13358d049e2de813d4dc83c41c3f87f5fae3c3a1
Author: Sergey Sharybin
Date:   Fri Mar 27 15:50:18 2015 +0500
Branches: master
https://developer.blender.org/rB13358d049e2de813d4dc83c41c3f87f5fae3c3a1

Freestyle: Code cleanup, prepare for strict C++ flags

===================================================================

M	source/blender/freestyle/intern/application/AppView.cpp
M	source/blender/freestyle/intern/application/AppView.h
M	source/blender/freestyle/intern/application/Controller.cpp
M	source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
M	source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
M	source/blender/freestyle/intern/geometry/GeomUtils.cpp
M	source/blender/freestyle/intern/geometry/Grid.h
M	source/blender/freestyle/intern/image/ImagePyramid.cpp
M	source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp
M	source/blender/freestyle/intern/python/BPy_Freestyle.cpp
M	source/blender/freestyle/intern/python/BPy_IntegrationType.cpp
M	source/blender/freestyle/intern/python/BPy_Operators.cpp
M	source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp
M	source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp
M	source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp
M	source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp
M	source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp
M	source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp
M	source/blender/freestyle/intern/stroke/Predicates1D.h
M	source/blender/freestyle/intern/stroke/Stroke.cpp
M	source/blender/freestyle/intern/view_map/BoxGrid.cpp
M	source/blender/freestyle/intern/view_map/Interface1D.cpp
M	source/blender/freestyle/intern/view_map/Silhouette.h
M	source/blender/freestyle/intern/view_map/SphericalGrid.cpp
M	source/blender/freestyle/intern/view_map/ViewMap.cpp
M	source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
M	source/blender/freestyle/intern/view_map/ViewMapBuilder.h
M	source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp

===================================================================

diff --git a/source/blender/freestyle/intern/application/AppView.cpp b/source/blender/freestyle/intern/application/AppView.cpp
index ae20241..9de426b 100644
--- a/source/blender/freestyle/intern/application/AppView.cpp
+++ b/source/blender/freestyle/intern/application/AppView.cpp
@@ -58,7 +58,7 @@ extern "C" {
 
 namespace Freestyle {
 
-AppView::AppView(const char *iName)
+AppView::AppView(const char * /*iName*/)
 {
 	_Fovy = DEG2RADF(30.0f);
 	_ModelRootNode = new NodeDrawingStyle;
diff --git a/source/blender/freestyle/intern/application/AppView.h b/source/blender/freestyle/intern/application/AppView.h
index 1410190..6338ace 100644
--- a/source/blender/freestyle/intern/application/AppView.h
+++ b/source/blender/freestyle/intern/application/AppView.h
@@ -100,12 +100,12 @@ public:
 		_SilhouetteRootNode->AddChild(iSilhouette);
 	}
 
-	inline void Add2DSilhouette(NodeGroup *iSilhouette)
+	inline void Add2DSilhouette(NodeGroup * /*iSilhouette*/)
 	{
 		//_pFENode->AddChild(iSilhouette);
 	}
 
-	inline void Add2DVisibleSilhouette(NodeGroup *iVSilhouette)
+	inline void Add2DVisibleSilhouette(NodeGroup * /*iVSilhouette*/)
 	{
 		//_pVisibleSilhouetteNode->AddChild(iVSilhouette);
 	}
diff --git a/source/blender/freestyle/intern/application/Controller.cpp b/source/blender/freestyle/intern/application/Controller.cpp
index 8d9b1a4..add7420 100644
--- a/source/blender/freestyle/intern/application/Controller.cpp
+++ b/source/blender/freestyle/intern/application/Controller.cpp
@@ -933,7 +933,7 @@ void Controller::InsertStyleModule(unsigned index, const char *iName, struct Tex
 	_Canvas->InsertStyleModule(index, sm);
 }
 
-void Controller::AddStyleModule(const char *iFileName)
+void Controller::AddStyleModule(const char * /*iFileName*/)
 {
 	//_pStyleWindow->Add(iFileName);
 }
@@ -1003,7 +1003,7 @@ void Controller::toggleEdgeTesselationNature(Nature::EdgeNature iNature)
 	ComputeViewMap();
 }
 
-void Controller::setModelsDir(const string& dir)
+void Controller::setModelsDir(const string& /*dir*/)
 {
 	//_current_dirs->setValue("models/dir", dir);
 }
@@ -1015,7 +1015,7 @@ string Controller::getModelsDir() const
 	return dir;
 }
 
-void Controller::setModulesDir(const string& dir)
+void Controller::setModulesDir(const string& /*dir*/)
 {
 	//_current_dirs->setValue("modules/dir", dir);
 }
diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
index f304e8a..0e8f622 100644
--- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
+++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
@@ -950,7 +950,7 @@ Object *BlenderStrokeRenderer::NewMesh() const
 	return ob;
 }
 
-Render *BlenderStrokeRenderer::RenderScene(Render *re, bool render)
+Render *BlenderStrokeRenderer::RenderScene(Render * /*re*/, bool render)
 {
 	Camera *camera = (Camera *)freestyle_scene->camera->data;
 	if (camera->clipend < _z)
diff --git a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
index 32b4c54..d1285cf 100644
--- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
+++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
@@ -87,7 +87,7 @@ int freestyle_viewport[4];
 // current scene
 Scene *freestyle_scene;
 
-static void load_post_callback(struct Main *main, struct ID *id, void *arg)
+static void load_post_callback(struct Main * /*main*/, struct ID * /*id*/, void * /*arg*/)
 {
 	lineset_copied = false;
 }
@@ -645,7 +645,7 @@ Render *FRS_do_stroke_rendering(Render *re, SceneRenderLayer *srl, int render)
 	return freestyle_render;
 }
 
-void FRS_finish_stroke_rendering(Render *re)
+void FRS_finish_stroke_rendering(Render * /*re*/)
 {
 	// clear canvas
 	controller->Clear();
diff --git a/source/blender/freestyle/intern/geometry/GeomUtils.cpp b/source/blender/freestyle/intern/geometry/GeomUtils.cpp
index a750cf2..3eb92c5 100644
--- a/source/blender/freestyle/intern/geometry/GeomUtils.cpp
+++ b/source/blender/freestyle/intern/geometry/GeomUtils.cpp
@@ -495,7 +495,7 @@ bool intersectRayBBox(const Vec3r& orig, const Vec3r& dir,      // ray origin an
                       real t0, real t1,
                       real& tmin,                               // I0 = orig + tmin * dir is the first intersection
                       real& tmax,                               // I1 = orig + tmax * dir is the second intersection
-                      real epsilon)
+                      real /*epsilon*/)
 {
 	float tymin, tymax, tzmin, tzmax;
 	Vec3r inv_direction(1.0 / dir[0], 1.0 / dir[1], 1.0 / dir[2]);
diff --git a/source/blender/freestyle/intern/geometry/Grid.h b/source/blender/freestyle/intern/geometry/Grid.h
index c1d04f6..62c0e58 100644
--- a/source/blender/freestyle/intern/geometry/Grid.h
+++ b/source/blender/freestyle/intern/geometry/Grid.h
@@ -97,11 +97,11 @@ class GridVisitor
 public:
 	virtual ~GridVisitor() {}; //soc
 
-	virtual void discoverCell(Cell *cell) {}
+	virtual void discoverCell(Cell * /*cell*/) {}
 
-	virtual void examineOccluder(Polygon3r *occ) {}
+	virtual void examineOccluder(Polygon3r * /*occ*/) {}
 
-	virtual void finishCell(Cell *cell) {}
+	virtual void finishCell(Cell * /*cell*/) {}
 
 	virtual bool stop() {
 		return false;
diff --git a/source/blender/freestyle/intern/image/ImagePyramid.cpp b/source/blender/freestyle/intern/image/ImagePyramid.cpp
index 251f47b..b81f830 100644
--- a/source/blender/freestyle/intern/image/ImagePyramid.cpp
+++ b/source/blender/freestyle/intern/image/ImagePyramid.cpp
@@ -42,7 +42,7 @@ ImagePyramid::ImagePyramid(const GrayImage& level0, unsigned nbLevels)
 }
 #endif
 
-ImagePyramid::ImagePyramid(const ImagePyramid& iBrother)
+ImagePyramid::ImagePyramid(const ImagePyramid& /*iBrother*/)
 {
 	if (!_levels.empty()) {
 		for (vector<GrayImage*>::iterator im = _levels.begin(), imend = _levels.end(); im != imend; ++im) {
diff --git a/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp b/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp
index ad54a81..50d8265 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 487a473..d226320 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`

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list