From aba4e6810f8b4d0e459137b64e061a2cadc457d1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 31 May 2019 23:21:16 +1000 Subject: Cleanup: style, use braces in source/ (include disabled blocks) --- source/blender/freestyle/intern/stroke/Stroke.cpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'source/blender/freestyle/intern/stroke/Stroke.cpp') diff --git a/source/blender/freestyle/intern/stroke/Stroke.cpp b/source/blender/freestyle/intern/stroke/Stroke.cpp index 13f8080552b..d18de1a7073 100644 --- a/source/blender/freestyle/intern/stroke/Stroke.cpp +++ b/source/blender/freestyle/intern/stroke/Stroke.cpp @@ -869,8 +869,9 @@ Stroke::const_vertex_iterator Stroke::vertices_last() const Stroke::vertex_container::reverse_iterator Stroke::vertices_last(float sampling) { // Resample if necessary - if (sampling < _sampling) + if (sampling < _sampling) { Resample(sampling); + } return _Vertices.rbegin(); } @@ -901,8 +902,9 @@ Material Stroke::material() const const_vertex_iterator v = vertices_begin(), vend = strokeVerticesEnd(); Material mat = (*v)->material(); for (; v != vend; ++v) { - if (mat != (*v)->material()) + if (mat != (*v)->material()) { Exception::raiseException(); + } } return mat; } @@ -912,8 +914,9 @@ int Stroke::qi() const const_vertex_iterator v = vertices_begin(), vend = vertices_end(); int qi_ = (*v)->qi(); for (; v != vend; ++v) { - if ((*v)->qi() != qi_) + if ((*v)->qi() != qi_) { Exception::raiseException(); + } } return qi_; } @@ -938,8 +941,9 @@ bool Stroke::occluders_empty() const const_vertex_iterator v = vertices_begin(), vend = vertices_end(); bool empty = (*v)->occluders_empty(); for (; v != vend; ++v) { - if ((*v)->occluders_empty() != empty) + if ((*v)->occluders_empty() != empty) { Exception::raiseException(); + } } return empty; } @@ -956,8 +960,9 @@ const SShape *Stroke::occluded_shape() const const_vertex_iterator v = vertices_begin(), vend = vertices_end(); const SShape *sshape = (*v)->occluded_shape(); for (; v != vend; ++v) { - if ((*v)->occluded_shape() != sshape) + if ((*v)->occluded_shape() != sshape) { Exception::raiseException(); + } } return sshape; } @@ -967,8 +972,9 @@ const bool Stroke::occludee_empty() const const_vertex_iterator v = vertices_begin(), vend = vertices_end(); bool empty = (*v)->occludee_empty(); for (; v != vend; ++v) { - if ((*v)->occludee_empty() != empty) + if ((*v)->occludee_empty() != empty) { Exception::raiseException(); + } } return empty; } @@ -978,8 +984,9 @@ const SShape *Stroke::shape() const const_vertex_iterator v = vertices_begin(), vend = vertices_end(); const SShape *sshape = (*v)->shape(); for (; v != vend; ++v) { - if ((*v)->shape() != sshape) + if ((*v)->shape() != sshape) { Exception::raiseException(); + } } return sshape; } -- cgit v1.2.3