diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-05-31 15:51:19 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-05-31 15:55:15 +0300 |
commit | d8dbd49a2f23b7637f05fc058f39bdf6ab706624 (patch) | |
tree | 0805b9372c82ae6505d87e879824efe1d3e32f8e /source/blender/freestyle/intern/stroke/CurveIterators.h | |
parent | 8987f7987d8160e1f6e79e8c85d6ce65b885ab25 (diff) |
Cleanup: style, use braces in source/
Automated using clang-tidy.
Diffstat (limited to 'source/blender/freestyle/intern/stroke/CurveIterators.h')
-rw-r--r-- | source/blender/freestyle/intern/stroke/CurveIterators.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/source/blender/freestyle/intern/stroke/CurveIterators.h b/source/blender/freestyle/intern/stroke/CurveIterators.h index b05c9838a3b..0ebbd0509ca 100644 --- a/source/blender/freestyle/intern/stroke/CurveIterators.h +++ b/source/blender/freestyle/intern/stroke/CurveIterators.h @@ -157,8 +157,9 @@ class CurvePointIterator : public Interface0DIteratorNested { virtual bool operator==(const Interface0DIteratorNested &b) const { const CurvePointIterator *it_exact = dynamic_cast<const CurvePointIterator *>(&b); - if (!it_exact) + if (!it_exact) { return false; + } return ((__A == it_exact->__A) && (__B == it_exact->__B) && (_t == it_exact->_t)); } @@ -175,15 +176,17 @@ class CurvePointIterator : public Interface0DIteratorNested { virtual bool isBegin() const { - if ((__A == _begin) && (_t < (float)M_EPSILON)) + if ((__A == _begin) && (_t < (float)M_EPSILON)) { return true; + } return false; } virtual bool isEnd() const { - if (__B == _end) + if (__B == _end) { return true; + } return false; } @@ -246,8 +249,9 @@ class CurvePointIterator : public Interface0DIteratorNested { --_currentn; --__A; --__B; - if (_currentn == _n - 1) + if (_currentn == _n - 1) { return 0; + } } if (0 == _step) { // means we iterate over initial vertices @@ -270,13 +274,16 @@ class CurvePointIterator : public Interface0DIteratorNested { } // round value - if (fabs(_t) < (float)M_EPSILON) + if (fabs(_t) < (float)M_EPSILON) { _t = 0.0f; + } if (_t < 0) { - if (_currentn == 0) + if (_currentn == 0) { _CurvilinearLength = 0.0f; - else + } + else { _CurvilinearLength += normAB * (-_t); + } _t = 0.0f; } return 0; |