diff options
Diffstat (limited to 'source/blender/freestyle/intern/view_map')
3 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/freestyle/intern/view_map/CulledOccluderSource.cpp b/source/blender/freestyle/intern/view_map/CulledOccluderSource.cpp index cb3a297076a..b53771ad2c2 100644 --- a/source/blender/freestyle/intern/view_map/CulledOccluderSource.cpp +++ b/source/blender/freestyle/intern/view_map/CulledOccluderSource.cpp @@ -191,7 +191,7 @@ void CulledOccluderSource::cullViewEdges(ViewMap &viewMap, bool extensiveFEdgeSe // Either we have run out of FEdges, or we already have the one edge we need to determine // visibility Cull all remaining edges. - while (fe != NULL && fe != festart) { + while (!ELEM(fe, NULL, festart)) { fe->setIsInImage(false); fe = fe->nextEdge(); } @@ -253,7 +253,7 @@ void CulledOccluderSource::cullViewEdges(ViewMap &viewMap, bool extensiveFEdgeSe expandGridSpaceOccluderProscenium(fe); } fe = fe->nextEdge(); - } while (fe != NULL && fe != festart); + } while (!ELEM(fe, NULL, festart)); } } diff --git a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp index aecd37fa0de..8866ec2e267 100644 --- a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp +++ b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp @@ -315,7 +315,7 @@ OWXFaceLayer ViewEdgeXBuilder::FindNextFaceLayer(const OWXFaceLayer &iFaceLayer) tend = iFaceLayer.fl->getSmoothEdge()->ta(); } // special case of EDGE_VERTEX config: - if ((tend == 0.0) || (tend == 1.0)) { + if (ELEM(tend, 0.0, 1.0)) { WVertex *nextVertex; if (tend == 0.0) { nextVertex = woeend->GetaVertex(); @@ -397,7 +397,7 @@ OWXFaceLayer ViewEdgeXBuilder::FindPreviousFaceLayer(const OWXFaceLayer &iFaceLa } // special case of EDGE_VERTEX config: - if ((tend == 0.0) || (tend == 1.0)) { + if (ELEM(tend, 0.0, 1.0)) { WVertex *previousVertex; if (tend == 0.0) { previousVertex = woebegin->GetaVertex(); diff --git a/source/blender/freestyle/intern/view_map/ViewMap.cpp b/source/blender/freestyle/intern/view_map/ViewMap.cpp index fa2f95dac72..b4faee7946b 100644 --- a/source/blender/freestyle/intern/view_map/ViewMap.cpp +++ b/source/blender/freestyle/intern/view_map/ViewMap.cpp @@ -836,7 +836,7 @@ void ViewEdge::UpdateFEdges() do { currentEdge->setViewEdge(this); currentEdge = currentEdge->nextEdge(); - } while ((currentEdge != NULL) && (currentEdge != _FEdgeB)); + } while (!ELEM(currentEdge, NULL, _FEdgeB)); // last one _FEdgeB->setViewEdge(this); } |