From c9e35c2ced92082c86f1ecb9ecd16c6230218c7c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 25 Sep 2022 15:14:13 +1000 Subject: Cleanup: remove redundant double parenthesis --- source/blender/freestyle/intern/geometry/GeomCleaner.cpp | 4 ++-- source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp | 6 +++--- source/blender/freestyle/intern/stroke/Chain.cpp | 2 +- source/blender/freestyle/intern/stroke/StrokeTesselator.cpp | 2 +- source/blender/freestyle/intern/view_map/Functions0D.cpp | 6 +++--- source/blender/freestyle/intern/view_map/Silhouette.cpp | 2 +- source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp | 4 ++-- source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp | 8 ++++---- 8 files changed, 17 insertions(+), 17 deletions(-) (limited to 'source/blender/freestyle') diff --git a/source/blender/freestyle/intern/geometry/GeomCleaner.cpp b/source/blender/freestyle/intern/geometry/GeomCleaner.cpp index 116154650f3..605601af7cc 100644 --- a/source/blender/freestyle/intern/geometry/GeomCleaner.cpp +++ b/source/blender/freestyle/intern/geometry/GeomCleaner.cpp @@ -173,8 +173,8 @@ struct GeomCleanerHasher { inline size_t operator()(const Vec3r &p) const { size_t res = ((unsigned long)(p[0] * _MUL)) % _MOD; - res = ((res + (unsigned long)(p[1]) * _MUL)) % _MOD; - return ((res + (unsigned long)(p[2]) * _MUL)) % _MOD; + res = (res + (unsigned long)(p[1]) * _MUL) % _MOD; + return (res + (unsigned long)(p[2]) * _MUL) % _MOD; } #undef _MUL #undef _MOD diff --git a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp index c801dc70114..75115b4abac 100644 --- a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp +++ b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp @@ -373,7 +373,7 @@ int BezierCurveShader::shade(Stroke &stroke) const ++v; for (vend = stroke.strokeVerticesEnd(); v != vend; ++v) { if (!((fabs(v->x() - (previous)->x()) < M_EPSILON) && - ((fabs(v->y() - (previous)->y()) < M_EPSILON)))) { + (fabs(v->y() - (previous)->y()) < M_EPSILON))) { data.emplace_back(v->x(), v->y()); } previous = v; @@ -395,7 +395,7 @@ int BezierCurveShader::shade(Stroke &stroke) const p = segmentsVertices.begin(); ++p; for (pend = segmentsVertices.end(); p != pend; ++p) { - CurveVertices.push_back((*p)); + CurveVertices.push_back(*p); } } @@ -660,7 +660,7 @@ int TipRemoverShader::shade(Stroke &stroke) const vector::iterator sv, svend; for (sv = verticesToRemove.begin(), svend = verticesToRemove.end(); sv != svend; ++sv) { - stroke.RemoveVertex((*sv)); + stroke.RemoveVertex(*sv); } // Resample so that our new stroke have the same number of vertices than before diff --git a/source/blender/freestyle/intern/stroke/Chain.cpp b/source/blender/freestyle/intern/stroke/Chain.cpp index 3778727da37..b3f4d4547e9 100644 --- a/source/blender/freestyle/intern/stroke/Chain.cpp +++ b/source/blender/freestyle/intern/stroke/Chain.cpp @@ -120,7 +120,7 @@ void Chain::push_viewedge_front(ViewEdge *iViewEdge, bool orientation) } do { current = (*v)->point2d(); - Curve::push_vertex_front((*v)); + Curve::push_vertex_front(*v); //_Length += (current - previous).norm(); previous = current; if (orientation) { diff --git a/source/blender/freestyle/intern/stroke/StrokeTesselator.cpp b/source/blender/freestyle/intern/stroke/StrokeTesselator.cpp index 2dce6140c3f..07ba45b81ab 100644 --- a/source/blender/freestyle/intern/stroke/StrokeTesselator.cpp +++ b/source/blender/freestyle/intern/stroke/StrokeTesselator.cpp @@ -64,7 +64,7 @@ NodeGroup *StrokeTesselator::Tesselate(StrokeVertexIterator begin, StrokeVertexI tshape->setFrsMaterial(_FrsMaterial); for (StrokeVertexIterator c = begin, cend = end; c != cend; c++) { - tshape->AddRep(Tesselate((*c))); + tshape->AddRep(Tesselate(*c)); } return group; diff --git a/source/blender/freestyle/intern/view_map/Functions0D.cpp b/source/blender/freestyle/intern/view_map/Functions0D.cpp index a461f368859..24625d39781 100644 --- a/source/blender/freestyle/intern/view_map/Functions0D.cpp +++ b/source/blender/freestyle/intern/view_map/Functions0D.cpp @@ -105,14 +105,14 @@ void getOccludersF0D(Interface0DIterator &it, set &oOccluders) occluder_container::const_iterator oitend = ve1->occluders_end(); for (; oit != oitend; ++oit) { - oOccluders.insert((*oit)); + oOccluders.insert(*oit); } if (ve2 != nullptr) { oit = ve2->occluders_begin(); oitend = ve2->occluders_end(); for (; oit != oitend; ++oit) { - oOccluders.insert((*oit)); + oOccluders.insert(*oit); } } } @@ -355,7 +355,7 @@ int GetOccludersF0D::operator()(Interface0DIterator &iter) // vsOccluders.insert(vsOccluders.begin(), occluders.begin(), occluders.end()); for (set::iterator it = occluders.begin(), itend = occluders.end(); it != itend; ++it) { - result.push_back((*it)); + result.push_back(*it); } return 0; } diff --git a/source/blender/freestyle/intern/view_map/Silhouette.cpp b/source/blender/freestyle/intern/view_map/Silhouette.cpp index 54e0626a7af..2398e82aca7 100644 --- a/source/blender/freestyle/intern/view_map/Silhouette.cpp +++ b/source/blender/freestyle/intern/view_map/Silhouette.cpp @@ -297,7 +297,7 @@ real FEdge::z_discontinuity() const z_discontinuity_functor _functor; Evaluate>(&_functor, iCombination, result); #endif - Vec3r middle((_VertexB->point3d() - _VertexA->point3d())); + Vec3r middle(_VertexB->point3d() - _VertexA->point3d()); middle /= 2; Vec3r disc_vec(middle - _occludeeIntersection); real res = disc_vec.norm() / bboxsize; diff --git a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp index 81e7abf6d5c..798f01a9aa5 100644 --- a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp +++ b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp @@ -57,7 +57,7 @@ void ViewEdgeXBuilder::BuildViewEdges(WXShape *iWShape, WXFace *wxf; for (wf = wfaces.begin(), wfend = wfaces.end(); wf != wfend; wf++) { wxf = dynamic_cast(*wf); - if (false == ((wxf))->hasSmoothEdges()) { // does it contain at least one smooth edge ? + if (false == (wxf)->hasSmoothEdges()) { // does it contain at least one smooth edge ? continue; } // parse all smooth layers: @@ -68,7 +68,7 @@ void ViewEdgeXBuilder::BuildViewEdges(WXShape *iWShape, if (!(*sl)->hasSmoothEdge()) { continue; } - if (stopSmoothViewEdge((*sl))) { // has it been parsed already ? + if (stopSmoothViewEdge(*sl)) { // has it been parsed already ? continue; } // here we know that we're dealing with a face layer that has not been processed yet and that diff --git a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp index 5642a80e77f..17447ced5e4 100644 --- a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp +++ b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp @@ -595,7 +595,7 @@ static void computeCumulativeVisibility(ViewMap *ioViewMap, for (set::iterator o = foundOccluders.begin(), oend = foundOccluders.end(); o != oend; ++o) { - (*ve)->AddOccluder((*o)); + (*ve)->AddOccluder(*o); } #if LOGGING if (_global.debug & G_DEBUG_FREESTYLE) { @@ -786,7 +786,7 @@ static void computeDetailedVisibility(ViewMap *ioViewMap, for (set::iterator o = foundOccluders.begin(), oend = foundOccluders.end(); o != oend; ++o) { - (*ve)->AddOccluder((*o)); + (*ve)->AddOccluder(*o); } #if LOGGING if (_global.debug & G_DEBUG_FREESTYLE) { @@ -925,7 +925,7 @@ static void computeFastVisibility(ViewMap *ioViewMap, G &grid, real epsilon) for (set::iterator o = foundOccluders.begin(), oend = foundOccluders.end(); o != oend; ++o) { - (*ve)->AddOccluder((*o)); + (*ve)->AddOccluder(*o); } // occludee -- @@ -1658,7 +1658,7 @@ void ViewMapBuilder::ComputeRayCastingVisibility(ViewMap *ioViewMap, real epsilo // occluders -- for (set::iterator o = occluders.begin(), oend = occluders.end(); o != oend; ++o) { - (*ve)->AddOccluder((*o)); + (*ve)->AddOccluder(*o); } #if LOGGING if (_global.debug & G_DEBUG_FREESTYLE) { -- cgit v1.2.3