diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-08 17:01:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-11 07:35:43 +0100 |
commit | f14b9d30293f180500fc56d81e5390021758e7c1 (patch) | |
tree | a6cd0b853169203cfa0953230e6774e7b1dd81b4 /embeddedobj | |
parent | d11120b95ee27cb4b05db466ed07f7a996dda125 (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 'embeddedobj')
-rw-r--r-- | embeddedobj/source/commonembedding/embedobj.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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; |