[Libreoffice-commits] core.git: include/cppcanvas
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Mon Dec 30 11:51:55 UTC 2019
include/cppcanvas/canvas.hxx | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
New commits:
commit 9bc3895b191ef357c33c04306250e4fee5015225
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Sun Dec 29 23:16:12 2019 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Dec 30 12:51:23 2019 +0100
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 at redhat.com>
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;
More information about the Libreoffice-commits
mailing list