commit 42c136fb7c54b0a02f3eff41ae81a319b8d1927e
parent 2460ada93bf5c9a53883735b85bf138b17a2701e
Author: Kyle Milz <kyle@0x30.net>
Date: Wed, 27 Jul 2016 20:33:41 -0600
compile all c++ with -std=c++11
Diffstat:
6 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/Jamrules b/Jamrules
@@ -13,6 +13,8 @@ else {
# Try and respect this, {pkg,llvm}-config gives -O? too unfortunately
OPTIM = $(CFLAGS) ;
+C++FLAGS += -std=c++11 ;
+
if $(OS) = OPENBSD {
C++ = eg++ ;
diff --git a/src/Jamfile b/src/Jamfile
@@ -9,13 +9,11 @@ InstallShell $(PREFIX)/bin : citrun-wrap ;
#
# utils.a
#
-ObjectC++Flags af_unix.cc runtime_conn.cc : -std=c++11 ;
Library utils : af_unix.cc runtime_conn.cc ;
#
# citrun-term
#
-ObjectC++Flags term_main.cc : -std=c++11 ;
LINKLIBS on citrun-term += -lcurses -L/usr/local/lib -lestdc++ ;
LinkLibraries citrun-term : utils ;
@@ -39,7 +37,6 @@ Stringize demo_atlas_glsl.h : demo_atlas.glsl ;
Stringize demo_vshader_glsl.h : demo_vshader.glsl ;
Stringize demo_fshader_glsl.h : demo_fshader.glsl ;
-ObjectC++Flags $(GL_SRCS) : -std=c++11 ;
ObjectC++Flags $(GL_SRCS) : `pkg-config $(PKG_CONFIG_LIBS) --cflags` ;
LINKLIBS on citrun-gl += `pkg-config $(PKG_CONFIG_LIBS) --libs` ;
diff --git a/src/glyphy/glyphy-arc-bezier.hh b/src/glyphy/glyphy-arc-bezier.hh
@@ -182,13 +182,13 @@ class ArcBezierApproximatorQuantized
Arc a (b.p0, b.p3, b.point (mid_t), false);
Arc orig_a = a;
- if (isfinite (max_d)) {
+ if (std::isfinite (max_d)) {
assert (max_d >= 0);
if (fabs (a.d) > max_d)
a.d = a.d < 0 ? -max_d : max_d;
}
if (d_bits && max_d != 0) {
- assert (isfinite (max_d));
+ assert (std::isfinite (max_d));
assert (fabs (a.d) <= max_d);
int mult = (1 << (d_bits - 1)) - 1;
int id = round (a.d / max_d * mult);
diff --git a/src/glyphy/glyphy-blob.cc b/src/glyphy/glyphy-blob.cc
@@ -43,7 +43,7 @@ arc_endpoint_encode (unsigned int ix, unsigned int iy, double d)
assert (ix <= MAX_X);
assert (iy <= MAX_Y);
unsigned int id;
- if (isinf (d))
+ if (std::isinf (d))
id = 0;
else {
assert (fabs (d) <= GLYPHY_MAX_D);
@@ -252,7 +252,7 @@ glyphy_arc_list_encode_blob (const glyphy_arc_endpoint_t *endpoints,
/* If the arclist is two arcs that can be combined in encoding if reordered,
* do that. */
if (near_endpoints.size () == 4 &&
- isinf (near_endpoints[2].d) &&
+ std::isinf (near_endpoints[2].d) &&
near_endpoints[0].p.x == near_endpoints[3].p.x &&
near_endpoints[0].p.y == near_endpoints[3].p.y)
{
diff --git a/src/glyphy/glyphy-extents.cc b/src/glyphy/glyphy-extents.cc
@@ -35,7 +35,7 @@ glyphy_extents_clear (glyphy_extents_t *extents)
glyphy_bool_t
glyphy_extents_is_empty (const glyphy_extents_t *extents)
{
- return isinf (extents->min_x);
+ return std::isinf (extents->min_x);
}
void
diff --git a/src/glyphy/glyphy-geometry.hh b/src/glyphy/glyphy-geometry.hh
@@ -255,7 +255,7 @@ inline double Point::squared_distance_to_point (const Point &p) const {
}
inline bool Point::is_finite (void) const {
- return isfinite (x) && isfinite (y);
+ return std::isfinite (x) && std::isfinite (y);
}
inline const Point Point::lerp (const double &a, const Point &p) const {
/* The following two cases are special-cased to get better floating