summaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-09 13:28:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-15 10:36:17 +0100
commit34d8710fff4859d455b51a7e0d90fe3a35bf2e6b (patch)
treef69c1932eed74971e614eb8712a6f66ee1dc1f15 /io
parente9f521d409845a0824752a39d7574f4fad7989d4 (diff)
remove local copies of std::min,std::max
Change-Id: I067c4dcabad55180e4734fb06338a8e843713936 Reviewed-on: https://gerrit.libreoffice.org/47692 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'io')
-rw-r--r--io/source/stm/omark.cxx6
-rw-r--r--io/source/stm/opipe.cxx4
-rw-r--r--io/source/stm/streamhelper.cxx2
-rw-r--r--io/source/stm/streamhelper.hxx3
4 files changed, 6 insertions, 9 deletions
diff --git a/io/source/stm/omark.cxx b/io/source/stm/omark.cxx
index fa0e0ae2cb80..a49ea4df7015 100644
--- a/io/source/stm/omark.cxx
+++ b/io/source/stm/omark.cxx
@@ -527,8 +527,8 @@ sal_Int32 OMarkableInputStream::readSomeBytes(Sequence< sal_Int8 >& aData, sal_I
// read from buffer
sal_Int32 nRead = 0;
sal_Int32 nInBuffer = m_pBuffer->getSize() - m_nCurrentPos;
- sal_Int32 nAdditionalBytesToRead = Min(nMaxBytesToRead-nInBuffer,m_input->available());
- nAdditionalBytesToRead = Max(0 , nAdditionalBytesToRead );
+ sal_Int32 nAdditionalBytesToRead = std::min<sal_Int32>(nMaxBytesToRead-nInBuffer,m_input->available());
+ nAdditionalBytesToRead = std::max<sal_Int32>(0 , nAdditionalBytesToRead );
// read enough bytes into buffer
if( 0 == nInBuffer ) {
@@ -543,7 +543,7 @@ sal_Int32 OMarkableInputStream::readSomeBytes(Sequence< sal_Int8 >& aData, sal_I
m_pBuffer->writeAt( m_pBuffer->getSize() , aData );
}
- nBytesRead = Min( nMaxBytesToRead , nInBuffer + nRead );
+ nBytesRead = std::min( nMaxBytesToRead , nInBuffer + nRead );
// now take everything from buffer !
m_pBuffer->readAt( m_nCurrentPos , aData , nBytesRead );
diff --git a/io/source/stm/opipe.cxx b/io/source/stm/opipe.cxx
index afdc92feef54..1065629f91f9 100644
--- a/io/source/stm/opipe.cxx
+++ b/io/source/stm/opipe.cxx
@@ -159,7 +159,7 @@ sal_Int32 OPipeImpl::readSomeBytes(Sequence< sal_Int8 >& aData, sal_Int32 nMaxBy
}
if( m_pFIFO->getSize() )
{
- sal_Int32 nSize = Min( nMaxBytesToRead , m_pFIFO->getSize() );
+ sal_Int32 nSize = std::min( nMaxBytesToRead , m_pFIFO->getSize() );
aData.realloc( nSize );
m_pFIFO->read( aData , nSize );
return nSize;
@@ -197,7 +197,7 @@ void OPipeImpl::skipBytes(sal_Int32 nBytesToSkip)
}
m_nBytesToSkip += nBytesToSkip;
- nBytesToSkip = Min( m_pFIFO->getSize() , m_nBytesToSkip );
+ nBytesToSkip = std::min( m_pFIFO->getSize() , m_nBytesToSkip );
m_pFIFO->skip( nBytesToSkip );
m_nBytesToSkip -= nBytesToSkip;
}
diff --git a/io/source/stm/streamhelper.cxx b/io/source/stm/streamhelper.cxx
index efe53dcc42ab..ffd1726c6754 100644
--- a/io/source/stm/streamhelper.cxx
+++ b/io/source/stm/streamhelper.cxx
@@ -148,7 +148,7 @@ void MemRingBuffer::writeAt( sal_Int32 nPos, const Sequence<sal_Int8> &seq )
// one area copy
memcpy( &( m_p[nStartWritingIndex]), seq.getConstArray() , nLen );
}
- m_nOccupiedBuffer = Max( nPos + seq.getLength() , m_nOccupiedBuffer );
+ m_nOccupiedBuffer = std::max( nPos + seq.getLength() , m_nOccupiedBuffer );
checkInvariants();
}
diff --git a/io/source/stm/streamhelper.hxx b/io/source/stm/streamhelper.hxx
index c03673d6f4df..94d7c60a75bc 100644
--- a/io/source/stm/streamhelper.hxx
+++ b/io/source/stm/streamhelper.hxx
@@ -24,9 +24,6 @@
#include <assert.h>
-#define Max( a, b ) (((a)>(b)) ? (a) : (b) )
-#define Min( a, b ) (((a)<(b)) ? (a) : (b) )
-
namespace io_stm
{