[Libreoffice-commits] .: unotools/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Fri Feb 4 02:56:36 PST 2011


 unotools/source/config/cmdoptions.cxx |   10 ----------
 1 file changed, 10 deletions(-)

New commits:
commit 0218f1016207cb20b6ad8a5d521e667a5e4b1861
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Fri Feb 4 11:53:42 2011 +0100

    No resize for boot::unordered_map.

diff --git a/unotools/source/config/cmdoptions.cxx b/unotools/source/config/cmdoptions.cxx
index 460552b..fcb1404 100644
--- a/unotools/source/config/cmdoptions.cxx
+++ b/unotools/source/config/cmdoptions.cxx
@@ -105,11 +105,6 @@ class SvtCmdOptions
             return ( m_aCommandHashMap.size() > 0 );
         }
 
-        void SetContainerSize( sal_Int32 nSize )
-        {
-            m_aCommandHashMap.resize( nSize );
-        }
-
         sal_Bool Lookup( const OUString& aCmd ) const
         {
             CommandHashMap::const_iterator pEntry = m_aCommandHashMap.find( aCmd );
@@ -292,9 +287,6 @@ SvtCommandOptions_Impl::SvtCommandOptions_Impl()
     sal_Int32	nItem     = 0 ;
     OUString    sCmd		  ;
 
-    // Set size of boost::unordered_map reach a used size of approx. 60%
-    m_aDisabledCommands.SetContainerSize( lNames.getLength() * 10 / 6 );
-
     // Get names/values for disabled commands.
     for( nItem=0; nItem < lNames.getLength(); ++nItem )
     {
@@ -343,9 +335,7 @@ void SvtCommandOptions_Impl::Notify( const Sequence< OUString >& )
     sal_Int32	nItem     = 0 ;
     OUString    sCmd		  ;
 
-    // Set size of boost::unordered_map reach a used size of approx. 60%
     m_aDisabledCommands.Clear();
-    m_aDisabledCommands.SetContainerSize( lNames.getLength() * 10 / 6 );
 
     // Get names/values for disabled commands.
     for( nItem=0; nItem < lNames.getLength(); ++nItem )


More information about the Libreoffice-commits mailing list