Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dacd9bb

Browse files
committed
Minor comment and indentation fixes.
svn path=/trunk/matplotlib/; revision=6903
1 parent 44a7d3d commit dacd9bb

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

src/path_converters.h

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ class PathNanRemover : protected EmbeddedQueue<4> {
162162
return code;
163163
}
164164

165-
if (needs_move_to) {
165+
if (needs_move_to)
166+
{
166167
queue_push(agg::path_cmd_move_to, *x, *y);
167168
}
168169

@@ -185,6 +186,9 @@ class PathNanRemover : protected EmbeddedQueue<4> {
185186

186187
queue_clear();
187188

189+
/* If the last point is finite, we use that for the
190+
moveto, otherwise, we'll use the first vertex of
191+
the next curve. */
188192
if (!(MPL_notisfinite64(*x) || MPL_notisfinite64(*y)))
189193
{
190194
queue_push(agg::path_cmd_move_to, *x, *y);
@@ -318,8 +322,8 @@ class PathClipper
318322
m_lastY = *y;
319323
unsigned moved = agg::clip_line_segment(&x0, &y0, &x1, &y1, m_cliprect);
320324
// moved >= 4 - Fully clipped
321-
// moved != 0 - First point has been moved
322-
// moved != 0 - Second point has been moved
325+
// moved & 1 != 0 - First point has been moved
326+
// moved & 2 != 0 - Second point has been moved
323327
if (moved < 4)
324328
{
325329
if (moved & 1)
@@ -480,7 +484,7 @@ class PathSimplifier : protected EmbeddedQueue<9>
480484
m_lastMax(false), m_nextX(0.0), m_nextY(0.0),
481485
m_lastWrittenX(0.0), m_lastWrittenY(0.0)
482486
{
483-
// empty
487+
// empty
484488
}
485489

486490
inline void rewind(unsigned path_id)
@@ -719,7 +723,8 @@ class PathSimplifier : protected EmbeddedQueue<9>
719723

720724
/* If we clipped some segments between this line and the next line
721725
we are starting, we also need to move to the last point. */
722-
if (m_clipped) {
726+
if (m_clipped)
727+
{
723728
queue_push(agg::path_cmd_move_to, m_lastx, m_lasty);
724729
}
725730
else if (!m_lastMax)

0 commit comments

Comments
 (0)