diff options
Diffstat (limited to 'io')
-rw-r--r-- | io/source/stm/omark.cxx | 6 | ||||
-rw-r--r-- | io/source/stm/opipe.cxx | 4 | ||||
-rw-r--r-- | io/source/stm/streamhelper.cxx | 2 | ||||
-rw-r--r-- | io/source/stm/streamhelper.hxx | 3 |
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 { |