summaryrefslogtreecommitdiffstats
path: root/src/2geom/conicsec.cpp
diff options
context:
space:
mode:
authorKris De Gussem <kris.degussem@gmail.com>2012-01-15 17:57:07 +0000
committerKris <Kris.De.Gussem@hotmail.com>2012-01-15 17:57:07 +0000
commitc908cda71c90792646e6dfe79143ca6b7249027b (patch)
treec96b48cd56e0a9847359493382593dfad7499c97 /src/2geom/conicsec.cpp
parentcppcheck tells us: Memory leak: potraceBitmap (diff)
downloadinkscape-c908cda71c90792646e6dfe79143ca6b7249027b.tar.gz
inkscape-c908cda71c90792646e6dfe79143ca6b7249027b.zip
cppcheck performance
(bzr r10891)
Diffstat (limited to 'src/2geom/conicsec.cpp')
-rw-r--r--src/2geom/conicsec.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/2geom/conicsec.cpp b/src/2geom/conicsec.cpp
index a7e8e0ad8..46793fb22 100644
--- a/src/2geom/conicsec.cpp
+++ b/src/2geom/conicsec.cpp
@@ -594,7 +594,7 @@ xAx xAx::operator*(double const &b) const {
}
Line bisector = make_bisector_line(LineSegment(A, C));
std::vector<double> bisect_rts = this->roots(bisector);
- if(bisect_rts.size() > 0) {
+ if(!bisect_rts.empty()) {
int besti = -1;
for(unsigned i =0; i < bisect_rts.size(); i++) {
Point p = bisector.pointAt(bisect_rts[i]);
@@ -1488,7 +1488,7 @@ Rect xAx::arc_bound (const Point & P1, const Point & Q, const Point & P2) const
*
* P: the point to compute the nearest one
*/
-std::vector<Point> xAx::allNearestPoints (const Point P) const
+std::vector<Point> xAx::allNearestPoints (const Point &P) const
{
// TODO: manage the circle - centre case
std::vector<Point> points;
@@ -1507,7 +1507,7 @@ std::vector<Point> xAx::allNearestPoints (const Point P) const
std::vector<Point> crs = intersect (*this, G);
//std::cout << "NEAREST POINT: crs.size = " << crs.size() << std::endl;
- if (crs.size() == 0) return points;
+ if (crs.empty()) return points;
size_t idx = 0;
double mindist = distanceSq (crs[0], P);