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 /sal | |
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 'sal')
-rw-r--r-- | sal/osl/w32/file_url.cxx | 2 | ||||
-rw-r--r-- | sal/rtl/math.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sal/osl/w32/file_url.cxx b/sal/osl/w32/file_url.cxx index d25fd9b56d71..9a53e143c6a4 100644 --- a/sal/osl/w32/file_url.cxx +++ b/sal/osl/w32/file_url.cxx @@ -314,7 +314,7 @@ static sal_Int32 PathRemoveFileSpec(LPWSTR lpPath, LPWSTR lpFileName, sal_Int32 lpFileName[0] = 0; LPWSTR lpLastBkSlash = wcsrchr( lpPath, '\\' ); LPWSTR lpLastSlash = wcsrchr( lpPath, '/' ); - LPWSTR lpLastDelimiter = lpLastSlash > lpLastBkSlash ? lpLastSlash : lpLastBkSlash; + LPWSTR lpLastDelimiter = std::max(lpLastSlash, lpLastBkSlash); if ( lpLastDelimiter ) { diff --git a/sal/rtl/math.cxx b/sal/rtl/math.cxx index a450f7baa774..f8a0f9dcec47 100644 --- a/sal/rtl/math.cxx +++ b/sal/rtl/math.cxx @@ -213,7 +213,7 @@ int getBitsInFracPart(double fAbsValue) int nFracSignificant = 53 - nLeastSignificant; int nBitsInFracPart = nFracSignificant - nExponent; - return nBitsInFracPart > 0 ? nBitsInFracPart : 0; + return std::max(nBitsInFracPart, 0); } template< typename T > |