summaryrefslogtreecommitdiffstats
path: root/registry
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-11 08:47:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-15 07:26:17 +0100
commit7d8e94444d989d0ac4a4055b207726708e9ec0da (patch)
treece3e4a09ed7932496c4d901360ff23787c8f6e24 /registry
parentFix typos (diff)
downloadcore-7d8e94444d989d0ac4a4055b207726708e9ec0da.tar.gz
core-7d8e94444d989d0ac4a4055b207726708e9ec0da.zip
convert a<b?a:b to std::min(a,b)
with something like git grep -nP '(.*)\s*<\s*(.*)\s*\?\s*\g1\s*:\s*\g2' -- *.?xx Change-Id: Id5078b35961847feb78a66204fdb7598ee63fd23 Note: we also convert a>b?b:a Reviewed-on: https://gerrit.libreoffice.org/47736 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'registry')
-rw-r--r--registry/source/reflwrit.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/registry/source/reflwrit.cxx b/registry/source/reflwrit.cxx
index 10742fcf789e..9996284cb4a6 100644
--- a/registry/source/reflwrit.cxx
+++ b/registry/source/reflwrit.cxx
@@ -20,6 +20,7 @@
#include <new>
#include <memory>
+#include <algorithm>
#include <sal/types.h>
#include <sal/macros.h>
#include <osl/endian.h>
@@ -570,7 +571,7 @@ void MethodEntry::reallocParams(sal_uInt16 size)
if (m_paramCount)
{
sal_uInt16 i;
- sal_uInt16 mn = size < m_paramCount ? size : m_paramCount;
+ sal_uInt16 mn = std::min(size, m_paramCount);
for (i = 0; i < mn; i++)
{
@@ -594,7 +595,7 @@ void MethodEntry::reallocExcs(sal_uInt16 size)
newExcNames = nullptr;
sal_uInt16 i;
- sal_uInt16 mn = size < m_excCount ? size : m_excCount;
+ sal_uInt16 mn = std::min(size, m_excCount);
for (i = 0; i < mn; i++)
{