From b8c44b4c3f6a353b8f870cd1e8eb2b1b6f997780 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Fri, 7 Feb 2014 14:38:33 +0100 Subject: [PATCH] BAffineTransform: C++11 compatibility fix inline const floats are a gcc extension. It is possible to do it in a standard way in C++11 using constexpr, but then gcc will reject the previously accepted nonstandard syntax. --- headers/os/interface/AffineTransform.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/headers/os/interface/AffineTransform.h b/headers/os/interface/AffineTransform.h index 91bcdebd88..516d473442 100644 --- a/headers/os/interface/AffineTransform.h +++ b/headers/os/interface/AffineTransform.h @@ -33,7 +33,11 @@ class BAffineTransform : public BFlattenable { public: +#if __cplusplus < 201103L static const double kDefaultEpsilon = 1e-14; +#else + static constexpr double kDefaultEpsilon = 1e-14; +#endif public: BAffineTransform();