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

Noel Grandin noel at peralex.com
Thu Sep 22 19:22:33 UTC 2016


 svl/source/inc/poolio.hxx     |    4 +++-
 svl/source/items/itempool.cxx |    4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit b0eecd2d3ba4a1a424a2d52cccf64fe6fc09c34b
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Sep 22 21:12:59 2016 +0200

    Revert "remove SfxPoolItemArrayBase_Impl typedef"
    
    This reverts commit d141d5b3bd11ba6154b5d064fb69900405724b13.
    
    seems like I pushed it too soon, it depends on other commits not in yet.

diff --git a/svl/source/inc/poolio.hxx b/svl/source/inc/poolio.hxx
index ec3ec83..627fd6b 100644
--- a/svl/source/inc/poolio.hxx
+++ b/svl/source/inc/poolio.hxx
@@ -58,6 +58,8 @@ struct SfxPoolVersion_Impl
                     {}
 };
 
+typedef std::vector<SfxPoolItem*> SfxPoolItemArrayBase_Impl;
+
 typedef std::shared_ptr< SfxPoolVersion_Impl > SfxPoolVersion_ImplPtr;
 
 /**
@@ -110,7 +112,7 @@ struct SfxItemPool_Impl
     bool                            mbPersistentRefCounts;
 
     SfxItemPool_Impl( SfxItemPool* pMaster, const OUString& rName, sal_uInt16 nStart, sal_uInt16 nEnd )
-        : maPoolItems(nEnd - nStart + 1)
+        : maPoolItems(nEnd - nStart + 1, static_cast<SfxPoolItemArray_Impl*>(nullptr))
         , aName(rName)
         , maPoolDefaults(nEnd - nStart + 1)
         , ppStaticDefaults(nullptr)
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index 7a38d45..6f4a6f2 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -646,7 +646,7 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich
         pItemArr = pImpl->maPoolItems[nIndex];
     }
 
-    std::vector<SfxPoolItem*>::iterator ppFree;
+    SfxPoolItemArrayBase_Impl::iterator ppFree;
     bool ppFreeIsSet = false;
 
     // Is this a 'poolable' item - ie. should we re-use and return
@@ -693,7 +693,7 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich
         // Unconditionally insert; check for a recently freed place
         if (pItemArr->maFree.size() > 0)
         {
-            auto itr = pItemArr->begin();
+            SfxPoolItemArrayBase_Impl::iterator itr = pItemArr->begin();
             sal_uInt32 nIdx = pItemArr->maFree.back();
             pItemArr->maFree.pop_back();
 


More information about the Libreoffice-commits mailing list