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

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Fri Oct 30 16:36:59 UTC 2020


 comphelper/source/misc/numberedcollection.cxx |    3 +--
 include/comphelper/numberedcollection.hxx     |    5 ++---
 2 files changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 06b39e3f1b9037a1368f83b7dc948a10cc34c981
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Oct 30 15:22:46 2020 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Oct 30 17:36:18 2020 +0100

    TNumberedItemHash NumberedCollection::m_lComponents is indexed on pointers...
    
    ...reinterpret_cast'ed to sal_IntPtr, so consistently use sal_IntPtr throughout
    here
    
    Change-Id: If0085c2ac7e0e2c755ec034766095baa11a1b08c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105071
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/comphelper/source/misc/numberedcollection.cxx b/comphelper/source/misc/numberedcollection.cxx
index e0615656c231..8252a306330b 100644
--- a/comphelper/source/misc/numberedcollection.cxx
+++ b/comphelper/source/misc/numberedcollection.cxx
@@ -21,7 +21,6 @@
 #include <comphelper/numberedcollection.hxx>
 #include <com/sun/star/frame/UntitledNumbersConst.hpp>
 #include <com/sun/star/lang/IllegalArgumentException.hpp>
-#include <tools/long.hxx>
 
 namespace comphelper{
 
@@ -230,7 +229,7 @@ OUString SAL_CALL NumberedCollection::getUntitledPrefix()
 void NumberedCollection::impl_cleanUpDeadItems (      TNumberedItemHash& lItems    ,
                                                 const TDeadItemList&     lDeadItems)
 {
-    for (const tools::Long& rDeadItem : lDeadItems)
+    for (const sal_IntPtr& rDeadItem : lDeadItems)
     {
         lItems.erase(rDeadItem);
     }
diff --git a/include/comphelper/numberedcollection.hxx b/include/comphelper/numberedcollection.hxx
index 9ba619a94eb3..cafe975b59c7 100644
--- a/include/comphelper/numberedcollection.hxx
+++ b/include/comphelper/numberedcollection.hxx
@@ -28,7 +28,6 @@
 #include <cppuhelper/basemutex.hxx>
 #include <cppuhelper/weakref.hxx>
 #include <cppuhelper/implbase.hxx>
-#include <tools/long.hxx>
 
 #include <unordered_map>
 #include <vector>
@@ -59,10 +58,10 @@ class COMPHELPER_DLLPUBLIC NumberedCollection final : private ::cppu::BaseMutex
         };
 
         typedef std::unordered_map<
-                    tools::Long,
+                    sal_IntPtr,
                     TNumberedItem  > TNumberedItemHash;
 
-        typedef ::std::vector< tools::Long > TDeadItemList;
+        typedef ::std::vector< sal_IntPtr > TDeadItemList;
 
 
     // interface


More information about the Libreoffice-commits mailing list