From f35bb1f74a0ffeb5c6477a25e3c4cde87a97bcf1 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 12:06:06 +0200 Subject: Removed unused includes, decrease compilation time (bzr r15025) --- src/sp-ellipse.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/sp-ellipse.cpp') diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp index 0675b7781..995f880c2 100644 --- a/src/sp-ellipse.cpp +++ b/src/sp-ellipse.cpp @@ -21,8 +21,6 @@ #include <2geom/circle.h> #include <2geom/ellipse.h> #include <2geom/path-sink.h> -#include <2geom/pathvector.h> -#include <2geom/transforms.h> #include "attributes.h" #include "display/curve.h" @@ -33,7 +31,6 @@ #include "style.h" #include "svg/svg.h" #include "svg/path-string.h" -#include "xml/repr.h" #ifndef M_PI -- cgit v1.2.3 From 43b49e325db73cc19b1731db6c69545664ee8fbe Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 13:26:17 +0200 Subject: Reverted changes to r15024 after many building problems (bzr r15027) --- src/sp-ellipse.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/sp-ellipse.cpp') diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp index 995f880c2..0675b7781 100644 --- a/src/sp-ellipse.cpp +++ b/src/sp-ellipse.cpp @@ -21,6 +21,8 @@ #include <2geom/circle.h> #include <2geom/ellipse.h> #include <2geom/path-sink.h> +#include <2geom/pathvector.h> +#include <2geom/transforms.h> #include "attributes.h" #include "display/curve.h" @@ -31,6 +33,7 @@ #include "style.h" #include "svg/svg.h" #include "svg/path-string.h" +#include "xml/repr.h" #ifndef M_PI -- cgit v1.2.3 From 35830f456cadaecf8b8e3944e3031a1a93f6cb41 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Wed, 3 Aug 2016 15:29:38 +0200 Subject: Removed unused includes, decreased compilation time. Once again (bzr r15034) --- src/sp-ellipse.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/sp-ellipse.cpp') diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp index 0675b7781..995f880c2 100644 --- a/src/sp-ellipse.cpp +++ b/src/sp-ellipse.cpp @@ -21,8 +21,6 @@ #include <2geom/circle.h> #include <2geom/ellipse.h> #include <2geom/path-sink.h> -#include <2geom/pathvector.h> -#include <2geom/transforms.h> #include "attributes.h" #include "display/curve.h" @@ -33,7 +31,6 @@ #include "style.h" #include "svg/svg.h" #include "svg/path-string.h" -#include "xml/repr.h" #ifndef M_PI -- cgit v1.2.3 From 2f53e4dbb4620edcabaffc964c55cb71090912f8 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Wed, 17 Aug 2016 09:39:43 +0200 Subject: Use M_PI, M_PI_2. We use these constants everywhere so if they are not defined we are already in trouble. No need to define them ourselves (except maybe in shared libraries). (bzr r15063) --- src/sp-ellipse.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/sp-ellipse.cpp') diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp index 995f880c2..0d60aa5d8 100644 --- a/src/sp-ellipse.cpp +++ b/src/sp-ellipse.cpp @@ -33,16 +33,10 @@ #include "svg/path-string.h" -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - -#define SP_2PI (2 * M_PI) - SPGenericEllipse::SPGenericEllipse() : SPShape() , start(0) - , end(SP_2PI) + , end(M_2_PI) , type(SP_GENERIC_ELLIPSE_UNDEFINED) , _closed(true) { @@ -533,7 +527,7 @@ void SPGenericEllipse::snappoints(std::vector &p, // Snap to the 4 quadrant points of the ellipse, but only if the arc // spans far enough to include them if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_ELLIPSE_QUADRANT_POINT)) { - for (double angle = 0; angle < SP_2PI; angle += M_PI_2) { + for (double angle = 0; angle < M_2_PI; angle += M_PI_2) { if (Geom::AngleInterval(this->start, this->end, true).contains(angle)) { Geom::Point pt = this->getPointAtAngle(angle) * i2dt; p.push_back(Inkscape::SnapCandidatePoint(pt, Inkscape::SNAPSOURCE_ELLIPSE_QUADRANT_POINT, Inkscape::SNAPTARGET_ELLIPSE_QUADRANT_POINT)); @@ -668,7 +662,7 @@ bool SPGenericEllipse::_isSlice() const { Geom::AngleInterval a(this->start, this->end, true); - return !(Geom::are_near(a.extent(), 0) || Geom::are_near(a.extent(), SP_2PI)); + return !(Geom::are_near(a.extent(), 0) || Geom::are_near(a.extent(), M_2_PI)); } /* -- cgit v1.2.3