Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-01-18 06:13:36 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-01-18 06:13:36 +0400
commit68715c5ca7c148f511ac1a8136e7590602895947 (patch)
treeddaf2b0eb4035e799bbc2e43ec5f1f13309e8387 /source/blender/freestyle/intern/view_map
parent94ae0232b0337ab70cecaef03cd845887cd36eaa (diff)
A patch set from Bastien Montagne (thanks!) for silencing build warnings (from gcc 4.7),
mostly by commenting out unused variables, or using the BLI's SET_UINT_IN_POINTER macro.
Diffstat (limited to 'source/blender/freestyle/intern/view_map')
-rw-r--r--source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp6
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp2
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapIO.cpp12
3 files changed, 11 insertions, 9 deletions
diff --git a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp
index f3ab3c6d94a..56c32d8e134 100644
--- a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp
@@ -67,7 +67,7 @@ void ViewEdgeXBuilder::BuildViewEdges(WXShape *iWShape, ViewShape *oVShape, vect
// Reinit structures
Init(oVShape);
- ViewEdge *vedge;
+ /* ViewEdge *vedge; */ /* UNUSED */
// Let us build the smooth stuff
//----------------------------------------
// We parse all faces to find the ones that contain smooth edges
@@ -87,7 +87,7 @@ void ViewEdgeXBuilder::BuildViewEdges(WXShape *iWShape, ViewShape *oVShape, vect
continue;
// here we know that we're dealing with a face layer that has not been processed yet and that contains
// a smooth edge.
- vedge = BuildSmoothViewEdge(OWXFaceLayer(*sl, true));
+ /* vedge =*/ /* UNUSED */ BuildSmoothViewEdge(OWXFaceLayer(*sl, true));
}
}
@@ -225,7 +225,7 @@ ViewEdge *ViewEdgeXBuilder::BuildSharpViewEdge(const OWXEdge& iWEdge)
// Find first edge:
OWXEdge firstWEdge = iWEdge;
- OWXEdge previousWEdge = firstWEdge;
+ /* OWXEdge previousWEdge = firstWEdge; */ /* UNUSED */
OWXEdge currentWEdge = firstWEdge;
list<OWXEdge> edgesChain;
#if 0 /* TK 02-Sep-2012 Experimental fix for incorrect view edge visibility. */
diff --git a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
index fc7da724e8f..ea959bfd81d 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
@@ -573,6 +573,8 @@ static void computeCumulativeVisibility(ViewMap *ioViewMap, G& grid, real epsilo
if (_global.debug & G_DEBUG_FREESTYLE) {
cout << "\tConclusion: QI = " << maxIndex << ", " << (*ve)->occluders_size() << " occluders." << endl;
}
+ #else
+ (void)maxIndex;
#endif
// occludee --
if (!wFaces.empty()) {
diff --git a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
index 978272848ec..0e0e02dcaee 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
@@ -1101,17 +1101,17 @@ int save(ostream& out, ViewMap *vm, ProgressBar *pb)
// For every object, initialize its userdata member to its index in the ViewMap list
for (unsigned int i0 = 0; i0 < vm->ViewShapes().size(); i0++) {
- vm->ViewShapes()[i0]->userdata = (void *)i0;
- vm->ViewShapes()[i0]->sshape()->userdata = (void *)i0;
+ vm->ViewShapes()[i0]->userdata = SET_UINT_IN_POINTER(i0);
+ vm->ViewShapes()[i0]->sshape()->userdata = SET_UINT_IN_POINTER(i0);
}
for (unsigned int i1 = 0; i1 < vm->FEdges().size(); i1++)
- vm->FEdges()[i1]->userdata = (void *)i1;
+ vm->FEdges()[i1]->userdata = SET_UINT_IN_POINTER(i1);
for (unsigned int i2 = 0; i2 < vm->SVertices().size(); i2++)
- vm->SVertices()[i2]->userdata = (void *)i2;
+ vm->SVertices()[i2]->userdata = SET_UINT_IN_POINTER(i2);
for (unsigned int i3 = 0; i3 < vm->ViewEdges().size(); i3++)
- vm->ViewEdges()[i3]->userdata = (void *)i3;
+ vm->ViewEdges()[i3]->userdata = SET_UINT_IN_POINTER(i3);
for (unsigned int i4 = 0; i4 < vm->ViewVertices().size(); i4++)
- vm->ViewVertices()[i4]->userdata = (void *)i4;
+ vm->ViewVertices()[i4]->userdata = SET_UINT_IN_POINTER(i4);
// Write the current options
unsigned char flags = Options::getFlags();