diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-01-01 19:58:59 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-01-02 16:14:36 +0000 |
commit | fd1372ba8b1c3eb3c7fad6d9c623176c8071f31b (patch) | |
tree | 448f0d04f780007b3eeeb76b7c4c8c54cbfd6d9b /tools | |
parent | iss is unordered_multimap, so can't rely on order (diff) | |
download | core-fd1372ba8b1c3eb3c7fad6d9c623176c8071f31b.tar.gz core-fd1372ba8b1c3eb3c7fad6d9c623176c8071f31b.zip |
boost::unordered_map->std::unordered_map
you can get debug stl this way
Change-Id: Ia70a3e7c7c452390e8bee34975d296c9318e4a19
Diffstat (limited to 'tools')
-rw-r--r-- | tools/inc/pch/precompiled_tl.hxx | 2 | ||||
-rw-r--r-- | tools/source/rc/resmgr.cxx | 19 |
2 files changed, 10 insertions, 11 deletions
diff --git a/tools/inc/pch/precompiled_tl.hxx b/tools/inc/pch/precompiled_tl.hxx index c74b9b81b6fc..6a47b833a628 100644 --- a/tools/inc/pch/precompiled_tl.hxx +++ b/tools/inc/pch/precompiled_tl.hxx @@ -24,7 +24,6 @@ #include <basegfx/vector/b2dvector.hxx> #include <boost/checked_delete.hpp> #include <boost/static_assert.hpp> -#include <boost/unordered_map.hpp> #include <cassert> #include <cmath> #include <com/sun/star/task/ErrorCodeIOException.hpp> @@ -83,6 +82,7 @@ #include <stdlib.h> #include <string.h> #include <time.h> +#include <unordered_map> #include <vector> #include <zlib.h> diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx index 39daa7d1b19d..a5a1d2c96a1c 100644 --- a/tools/source/rc/resmgr.cxx +++ b/tools/source/rc/resmgr.cxx @@ -47,12 +47,11 @@ #include <i18nlangtag/mslangid.hxx> #include <tools/simplerm.hxx> -#include <functional> #include <algorithm> -#include <boost/unordered_map.hpp> +#include <functional> #include <list> #include <set> - +#include <unordered_map> using namespace osl; @@ -89,7 +88,7 @@ class InternalResMgr OUString aResName; bool bSingular; LanguageTag aLocale; - boost::unordered_map<sal_uInt64, int>* pResUseDump; + std::unordered_map<sal_uInt64, int>* pResUseDump; InternalResMgr( const OUString& rFileURL, const OUString& aPrefix, @@ -123,7 +122,7 @@ class ResMgrContainer {} }; - boost::unordered_map< OUString, ContainerElement, OUStringHash> m_aResFiles; + std::unordered_map< OUString, ContainerElement, OUStringHash> m_aResFiles; LanguageTag m_aDefLocale; ResMgrContainer() : m_aDefLocale( LANGUAGE_SYSTEM) { init(); } @@ -160,7 +159,7 @@ ResMgrContainer& ResMgrContainer::get() ResMgrContainer::~ResMgrContainer() { - for( boost::unordered_map< OUString, ContainerElement, OUStringHash >::iterator it = + for( std::unordered_map< OUString, ContainerElement, OUStringHash >::iterator it = m_aResFiles.begin(); it != m_aResFiles.end(); ++it ) { OSL_TRACE( "Resource file %s loaded %d times", @@ -231,7 +230,7 @@ InternalResMgr* ResMgrContainer::getResMgr( const OUString& rPrefix, ) { LanguageTag aLocale( rLocale ); - boost::unordered_map< OUString, ContainerElement, OUStringHash >::iterator it = m_aResFiles.end(); + std::unordered_map< OUString, ContainerElement, OUStringHash >::iterator it = m_aResFiles.end(); ::std::vector< OUString > aFallbacks( aLocale.getFallbackStrings( true)); if (!isAlreadyPureenUS( aLocale)) @@ -378,7 +377,7 @@ void ResMgrContainer::freeResMgr( InternalResMgr* pResMgr ) delete pResMgr; else { - boost::unordered_map< OUString, ContainerElement, OUStringHash >::iterator it = + std::unordered_map< OUString, ContainerElement, OUStringHash >::iterator it = m_aResFiles.find( pResMgr->aResName ); if( it != m_aResFiles.end() ) { @@ -456,7 +455,7 @@ InternalResMgr::~InternalResMgr() RTL_TEXTENCODING_UTF8)); aStm.WriteLine(aLine.makeStringAndClear()); - for( boost::unordered_map<sal_uInt64, int>::const_iterator it = pResUseDump->begin(); + for( std::unordered_map<sal_uInt64, int>::const_iterator it = pResUseDump->begin(); it != pResUseDump->end(); ++it ) { sal_uInt64 nKeyId = it->first; @@ -509,7 +508,7 @@ bool InternalResMgr::Create() const sal_Char* pLogFile = getenv( "STAR_RESOURCE_LOGGING" ); if ( pLogFile ) { - pResUseDump = new boost::unordered_map<sal_uInt64, int>; + pResUseDump = new std::unordered_map<sal_uInt64, int>; for( sal_uInt32 i = 0; i < nEntries; ++i ) (*pResUseDump)[pContent[i].nTypeAndId] = 1; } |