summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-08 17:01:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-11 07:35:43 +0100
commitf14b9d30293f180500fc56d81e5390021758e7c1 (patch)
treea6cd0b853169203cfa0953230e6774e7b1dd81b4 /drawinglayer
parentd11120b95ee27cb4b05db466ed07f7a996dda125 (diff)
convert (a>b?a:b) to std::max(a,b)
with something like: git grep -nP '(.*)\s*>\s*(.*)\s*\?\s*\g1\s*:\s*\g2' Change-Id: I60b9a3a2a09162bc0de4c13fdde2c209696e5413 Reviewed-on: https://gerrit.libreoffice.org/47602 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/primitive2d/textlayoutdevice.cxx2
-rw-r--r--drawinglayer/source/processor3d/defaultprocessor3d.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index ca0b8bb7e95c..820f0f9dbe4c 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -453,7 +453,7 @@ namespace drawinglayer
// TODO: eKerning
// set FontHeight and init to no FontScaling
- o_rSize.setY(rFont.GetFontSize().getHeight() > 0 ? rFont.GetFontSize().getHeight() : 0);
+ o_rSize.setY(std::max<long>(rFont.GetFontSize().getHeight(), 0));
o_rSize.setX(o_rSize.getY());
#ifdef _WIN32
diff --git a/drawinglayer/source/processor3d/defaultprocessor3d.cxx b/drawinglayer/source/processor3d/defaultprocessor3d.cxx
index 40eac4395e04..36b6939362d7 100644
--- a/drawinglayer/source/processor3d/defaultprocessor3d.cxx
+++ b/drawinglayer/source/processor3d/defaultprocessor3d.cxx
@@ -234,7 +234,7 @@ namespace drawinglayer
// calculate logic pixel size in texture coordinates
const double fLogicTexSizeX(fLogicPixelSizeWorld / rPrimitive.getTextureSize().getX());
const double fLogicTexSizeY(fLogicPixelSizeWorld / rPrimitive.getTextureSize().getY());
- const double fLogicTexSize(fLogicTexSizeX > fLogicTexSizeY ? fLogicTexSizeX : fLogicTexSizeY);
+ const double fLogicTexSize(std::max(fLogicTexSizeX, fLogicTexSizeY));
// create texture and set
mpGeoTexSvx.reset(new texture::GeoTexSvxMultiHatch(rPrimitive, fLogicTexSize));