diff options
Diffstat (limited to 'source/blender/freestyle/intern/winged_edge/WEdge.h')
-rw-r--r-- | source/blender/freestyle/intern/winged_edge/WEdge.h | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.h b/source/blender/freestyle/intern/winged_edge/WEdge.h index 1a141629c6d..037e21ab4e3 100644 --- a/source/blender/freestyle/intern/winged_edge/WEdge.h +++ b/source/blender/freestyle/intern/winged_edge/WEdge.h @@ -140,10 +140,12 @@ class WVertex { inline void setBorder(bool b) { - if (b) + if (b) { _Border = 1; - else + } + else { _Border = 0; + } } /*! Adds an edge to the edges list */ @@ -600,8 +602,9 @@ class WEdge { */ static inline WVertex *CommonVertex(WEdge *iEdge1, WEdge *iEdge2) { - if (!iEdge1 || !iEdge2) + if (!iEdge1 || !iEdge2) { return NULL; + } WVertex *wv1 = iEdge1->GetaOEdge()->GetaVertex(); WVertex *wv2 = iEdge1->GetaOEdge()->GetbVertex(); @@ -665,10 +668,12 @@ class WEdge { inline WOEdge *GetOtherOEdge(WOEdge *iOEdge) { - if (iOEdge == _paOEdge) + if (iOEdge == _paOEdge) { return _pbOEdge; - else + } + else { return _paOEdge; + } } /*! modifiers */ @@ -809,8 +814,9 @@ class WFace { for (vector<WOEdge *>::iterator woe = _OEdgeList.begin(), woend = _OEdgeList.end(); woe != woend; woe++) { - if ((*woe)->GetaVertex() == iVertex) + if ((*woe)->GetaVertex() == iVertex) { return index; + } ++index; } return -1; @@ -831,8 +837,9 @@ class WFace { woe != woend; woe++) { WFace *af; - if ((af = (*woe)->GetaFace())) + if ((af = (*woe)->GetaFace())) { oWFaces.push_back(af); + } } } @@ -896,8 +903,9 @@ class WFace { vector<WOEdge *>::iterator woe, woend, woefirst; woefirst = _OEdgeList.begin(); for (woe = woefirst, woend = _OEdgeList.end(); woe != woend; ++woe) { - if (found) + if (found) { return (*woe); + } if ((*woe) == iOEdge) { found = true; @@ -905,8 +913,9 @@ class WFace { } // We left the loop. That means that the first OEdge was the good one: - if (found) + if (found) { return (*woefirst); + } return NULL; } @@ -929,8 +938,9 @@ class WFace { for (vector<WOEdge *>::const_iterator woe = _OEdgeList.begin(), woeend = _OEdgeList.end(); woe != woeend; ++woe) { - if ((*woe)->GetOwner()->GetbOEdge() == 0) + if ((*woe)->GetOwner()->GetbOEdge() == 0) { return true; + } } return false; } @@ -1250,11 +1260,13 @@ class WShape { (*e)->ResetUserData(); // manages WOEdge: WOEdge *oe = (*e)->GetaOEdge(); - if (oe) + if (oe) { oe->ResetUserData(); + } oe = (*e)->GetbOEdge(); - if (oe) + if (oe) { oe->ResetUserData(); + } } for (vector<WFace *>::iterator f = _FaceList.begin(), fend = _FaceList.end(); f != fend; f++) { @@ -1338,8 +1350,9 @@ class WingedEdge { void clear() { - for (vector<WShape *>::iterator it = _wshapes.begin(); it != _wshapes.end(); it++) + for (vector<WShape *>::iterator it = _wshapes.begin(); it != _wshapes.end(); it++) { delete *it; + } _wshapes.clear(); _numFaces = 0; } |