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 /i18npool/source/search | |
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 'i18npool/source/search')
-rw-r--r-- | i18npool/source/search/levdis.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/i18npool/source/search/levdis.cxx b/i18npool/source/search/levdis.cxx index 60970fe402d9..6d8330af3852 100644 --- a/i18npool/source/search/levdis.cxx +++ b/i18npool/source/search/levdis.cxx @@ -56,6 +56,7 @@ */ #include <string.h> +#include <algorithm> #if defined( _MSC_VER ) #pragma warning(once: 4068) @@ -63,10 +64,6 @@ #include "levdis.hxx" -#ifdef __sun -#undef min -#endif - #define LEVDISBIG (nLimit + 1) // Return value if distance > nLimit #define LEVDISDOUBLEBUF 2048 // no doubling atop this border @@ -340,9 +337,9 @@ int WLevDistance::Mid3( int x, int y, int z ) int WLevDistance::Max3( int x, int y, int z ) { if ( x > y ) - return( x > z ? x : z ); + return std::max(x, z); else - return( y > z ? y : z ); + return std::max(y, z); } // initialize data from CTOR |