From c6ef26a457390721cb0edb586bdfa2c6fe33e3e6 Mon Sep 17 00:00:00 2001 From: ntfshard Date: Wed, 29 Jul 2015 02:23:32 +0300 Subject: [PATCH] std::list::empty faster than std::list::size (for C++03) --- xs/src/clipper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xs/src/clipper.cpp b/xs/src/clipper.cpp index f3740f9d1..83153c996 100644 --- a/xs/src/clipper.cpp +++ b/xs/src/clipper.cpp @@ -2588,7 +2588,7 @@ void Clipper::ProcessHorizontal(TEdge *horzEdge) MaximaList::const_iterator maxIt; MaximaList::const_reverse_iterator maxRit; - if (m_Maxima.size() > 0) + if (!m_Maxima.empty()) { //get the first maxima in range (X) ... if (dir == dLeftToRight) @@ -2620,7 +2620,7 @@ void Clipper::ProcessHorizontal(TEdge *horzEdge) //this code block inserts extra coords into horizontal edges (in output //polygons) whereever maxima touch these horizontal edges. This helps //'simplifying' polygons (ie if the Simplify property is set). - if (m_Maxima.size() > 0) + if (!m_Maxima.empty()) { if (dir == dLeftToRight) {