[Libreoffice-commits] core.git: tools/source

Michael Stahl mstahl at redhat.com
Fri Mar 28 18:13:31 PDT 2014


 tools/source/stream/stream.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit bb20d37025318d5a2fb35689c26c3600a625ed68
Author: Michael Stahl <mstahl at redhat.com>
Date:   Sat Mar 29 02:09:34 2014 +0100

    tools: try to fix std::min ambiguity for MSVC
    
    Change-Id: Id81ad8702d513c5bb3f4f8de2f9d7c75c7852d4d

diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 086f797..48cae55 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -265,7 +265,8 @@ ErrCode SvAsyncLockBytes::ReadAt(sal_uInt64 const nPos, void * pBuffer, sal_Size
         return SvOpenLockBytes::ReadAt(nPos, pBuffer, nCount, pRead);
     else
     {
-        sal_Size nTheCount = std::min(nPos < m_nSize ? m_nSize - nPos : 0, nCount);
+        sal_Size nTheCount =
+            std::min<sal_Size>(nPos < m_nSize ? m_nSize - nPos : 0, nCount);
         ErrCode nError = SvOpenLockBytes::ReadAt(nPos, pBuffer, nTheCount,
                                                  pRead);
         return !nCount || nTheCount == nCount || nError ? nError :
@@ -281,7 +282,8 @@ ErrCode SvAsyncLockBytes::WriteAt(sal_uInt64 const nPos, const void * pBuffer,
         return SvOpenLockBytes::WriteAt(nPos, pBuffer, nCount, pWritten);
     else
     {
-        sal_Size nTheCount = std::min(nPos < m_nSize ? m_nSize - nPos : 0, nCount);
+        sal_Size nTheCount =
+            std::min<sal_Size>(nPos < m_nSize ? m_nSize - nPos : 0, nCount);
         ErrCode nError = SvOpenLockBytes::WriteAt(nPos, pBuffer, nTheCount,
                                                   pWritten);
         return !nCount || nTheCount == nCount || nError ? nError :


More information about the Libreoffice-commits mailing list