summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-12-29 23:16:12 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-12-30 12:51:23 +0100
commit9bc3895b191ef357c33c04306250e4fee5015225 (patch)
tree02a69a854e1bb376d76d5cece78fff5fc1338d96 /include
parent6c6b3d4a7cf62ea01bf1bc4583b05b67f2b81ce2 (diff)
Avoid -Werror,-Wdeprecated-enum-float-conversion
...with recent Clang 10 trunk: > slideshow/source/engine/shapes/viewshape.cxx:813:81: error: arithmetic between enumeration type 'cppcanvas::Canvas::(anonymous enum at include/cppcanvas/canvas.hxx:57:9)' and floating-point type 'double' is deprecated [-Werror,-Wdeprecated-enum-float-conversion] > const double nXBorder( ::cppcanvas::Canvas::ANTIALIASING_EXTRA_SIZE / rViewTransform.get(0,0) ); > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: I30b8457250545a9a16b2e29f94e0623175f43ff9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85968 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/cppcanvas/canvas.hxx21
1 files changed, 9 insertions, 12 deletions
diff --git a/include/cppcanvas/canvas.hxx b/include/cppcanvas/canvas.hxx
index 441986cd03b6..ec34af5e0caa 100644
--- a/include/cppcanvas/canvas.hxx
+++ b/include/cppcanvas/canvas.hxx
@@ -54,18 +54,15 @@ namespace cppcanvas
class Canvas
{
public:
- enum
- {
- /** Extra pixel used when canvas anti-aliases.
-
- Enlarge the bounding box of drawing primitives by this
- amount in both dimensions, and on both sides of the
- bounds, to account for extra pixel touched outside the
- actual primitive bounding box, when the canvas
- performs anti-aliasing.
- */
- ANTIALIASING_EXTRA_SIZE=2
- };
+ /** Extra pixel used when canvas anti-aliases.
+
+ Enlarge the bounding box of drawing primitives by this
+ amount in both dimensions, and on both sides of the
+ bounds, to account for extra pixel touched outside the
+ actual primitive bounding box, when the canvas
+ performs anti-aliasing.
+ */
+ static constexpr auto ANTIALIASING_EXTRA_SIZE=2;
Canvas() = default;
Canvas(Canvas const &) = default;