From f14b9d30293f180500fc56d81e5390021758e7c1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 8 Jan 2018 17:01:49 +0200 Subject: 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 Reviewed-by: Noel Grandin --- embeddedobj/source/commonembedding/embedobj.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'embeddedobj') diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx index 60020a4ab86f..32c5085232dc 100644 --- a/embeddedobj/source/commonembedding/embedobj.cxx +++ b/embeddedobj/source/commonembedding/embedobj.cxx @@ -58,8 +58,8 @@ awt::Rectangle GetRectangleInterception( const awt::Rectangle& aRect1, const awt OSL_ENSURE( aRect1.Width >= 0 && aRect2.Width >= 0 && aRect1.Height >= 0 && aRect2.Height >= 0, "Offset must not be less then zero!" ); - aResult.X = aRect1.X > aRect2.X ? aRect1.X : aRect2.X; - aResult.Y = aRect1.Y > aRect2.Y ? aRect1.Y : aRect2.Y; + aResult.X = std::max(aRect1.X, aRect2.X); + aResult.Y = std::max(aRect1.Y, aRect2.Y); sal_Int32 nRight1 = aRect1.X + aRect1.Width; sal_Int32 nBottom1 = aRect1.Y + aRect1.Height; -- cgit v1.2.3