[Libreoffice-commits] core.git: include/comphelper

Stephan Bergmann sbergman at redhat.com
Wed Aug 20 05:05:25 PDT 2014


 include/comphelper/sequence.hxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit f340f0454627939f1830826fb5cc53a90e6c62a4
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Aug 20 14:04:43 2014 +0200

    Pick a more suitable type for nLength
    
    Change-Id: I6e38b82f08884c4e187e5b3ca2c95a0d4ca8d541

diff --git a/include/comphelper/sequence.hxx b/include/comphelper/sequence.hxx
index 235c4c9..6dd4f9c 100644
--- a/include/comphelper/sequence.hxx
+++ b/include/comphelper/sequence.hxx
@@ -94,11 +94,11 @@ namespace comphelper
     template<class T>
     void removeElementAt(staruno::Sequence<T>& _rSeq, sal_Int32 _nPos)
     {
-        sal_uInt32 nLength = _rSeq.getLength();
+        sal_Int32 nLength = _rSeq.getLength();
 
-        OSL_ENSURE(0 <= _nPos && (sal_uInt32)_nPos < nLength, "invalid index");
+        OSL_ENSURE(0 <= _nPos && _nPos < nLength, "invalid index");
 
-        for (sal_uInt32 i = (sal_uInt32)_nPos + 1; i < nLength; ++i)
+        for (sal_Int32 i = _nPos + 1; i < nLength; ++i)
         {
             _rSeq[i-1] = _rSeq[i];
         }


More information about the Libreoffice-commits mailing list