Author: hdu Date: Thu May 15 09:59:27 2014 New Revision: 1594842 URL: http://svn.apache.org/r1594842 Log: #i124896# remove obsoleted sal-module-internal custom STL allocator
The SAL module avoided the heavy dependency on the stlport4-libraries by using a custom allocator for its internal STL containers. With stlport4 removed these dependencies are gone and the SAL-internal custom allocator is obsoleted. Since the custom allocator results in build problems with clang>=3.4 or xcode>=5.1 it is time to remove it for good. Removed: openoffice/trunk/main/sal/inc/rtl/allocator.hxx Modified: openoffice/trunk/main/sal/inc/osl/diagnose.hxx openoffice/trunk/main/sal/osl/all/debugbase.cxx openoffice/trunk/main/sal/osl/w32/path_helper.hxx openoffice/trunk/main/sal/osl/w32/procimpl.cxx openoffice/trunk/main/sal/qa/osl/process/osl_process.cxx openoffice/trunk/main/sal/rtl/source/bootstrap.cxx openoffice/trunk/main/sal/rtl/source/hash.cxx openoffice/trunk/main/sal/rtl/source/unload.cxx Modified: openoffice/trunk/main/sal/inc/osl/diagnose.hxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sal/inc/osl/diagnose.hxx?rev=1594842&r1=1594841&r2=1594842&view=diff ============================================================================== --- openoffice/trunk/main/sal/inc/osl/diagnose.hxx (original) +++ openoffice/trunk/main/sal/inc/osl/diagnose.hxx Thu May 15 09:59:27 2014 @@ -23,21 +23,10 @@ #if ! defined(OSL_DIAGNOSE_HXX_INCLUDED) #define OSL_DIAGNOSE_HXX_INCLUDED -#if ! defined(_OSL_DIAGNOSE_H_) #include "osl/diagnose.h" -#endif -#if ! defined(_OSL_INTERLOCK_H_) #include "osl/interlck.h" -#endif -#if ! defined(_OSL_MUTEX_HXX_) #include "osl/mutex.hxx" -#endif -#if ! defined(INCLUDED_RTL_ALLOCATOR_HXX) -#include "rtl/allocator.hxx" -#endif -#if ! defined(_RTL_INSTANCE_HXX_) #include "rtl/instance.hxx" -#endif #include <hash_set> #include <functional> #include <typeinfo> @@ -91,8 +80,7 @@ struct VoidPtrHash : ::std::unary_functi } }; -typedef ::std::hash_set<void const*, VoidPtrHash, ::std::equal_to<void const*>, - ::rtl::Allocator<void const*> > VoidPointerSet; +typedef ::std::hash_set<void const*, VoidPtrHash, ::std::equal_to<void const*> > VoidPointerSet; struct ObjectRegistryData { ObjectRegistryData( ::std::type_info const& rTypeInfo ) Modified: openoffice/trunk/main/sal/osl/all/debugbase.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/all/debugbase.cxx?rev=1594842&r1=1594841&r2=1594842&view=diff ============================================================================== --- openoffice/trunk/main/sal/osl/all/debugbase.cxx (original) +++ openoffice/trunk/main/sal/osl/all/debugbase.cxx Thu May 15 09:59:27 2014 @@ -44,7 +44,7 @@ namespace { -typedef std::vector<rtl::OString, rtl::Allocator<rtl::OString> > OStringVec; +typedef std::vector<rtl::OString> OStringVec; struct StaticDebugBaseAddressFilter : rtl::StaticWithInit<OStringVec const, StaticDebugBaseAddressFilter> { Modified: openoffice/trunk/main/sal/osl/w32/path_helper.hxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/w32/path_helper.hxx?rev=1594842&r1=1594841&r2=1594842&view=diff ============================================================================== --- openoffice/trunk/main/sal/osl/w32/path_helper.hxx (original) +++ openoffice/trunk/main/sal/osl/w32/path_helper.hxx Thu May 15 09:59:27 2014 @@ -30,7 +30,6 @@ #include "path_helper.h" #include <rtl/ustring.hxx> -#include <rtl/allocator.hxx> namespace osl { Modified: openoffice/trunk/main/sal/osl/w32/procimpl.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/w32/procimpl.cxx?rev=1594842&r1=1594841&r2=1594842&view=diff ============================================================================== --- openoffice/trunk/main/sal/osl/w32/procimpl.cxx (original) +++ openoffice/trunk/main/sal/osl/w32/procimpl.cxx Thu May 15 09:59:27 2014 @@ -43,7 +43,6 @@ #include <rtl/ustring.hxx> #include <rtl/ustrbuf.hxx> #include "secimpl.h" -#include "rtl/allocator.hxx" #include <osl/file.hxx> #include <list> @@ -63,11 +62,11 @@ const rtl::OUString QUOTE = rtl::OUStrin namespace /* private */ { //################################################# - typedef std::list<rtl::OUString, rtl::Allocator<rtl::OUString> > string_container_t; + typedef std::list<rtl::OUString> string_container_t; typedef string_container_t::iterator string_container_iterator_t; typedef string_container_t::const_iterator string_container_const_iterator_t; typedef std::pair<string_container_iterator_t, string_container_iterator_t> iterator_pair_t; - typedef std::vector<sal_Unicode, rtl::Allocator<sal_Unicode> > environment_container_t; + typedef std::vector<sal_Unicode > environment_container_t; //################################################# /* Function object that compares two strings that are @@ -307,7 +306,7 @@ namespace /* private */ rtl::OUString ret(path); if (path.getLength() > 260) { - std::vector<sal_Unicode, rtl::Allocator<sal_Unicode> > vec(path.getLength() + 1); + std::vector<sal_Unicode> vec(path.getLength() + 1); //GetShortPathNameW only works if the file can be found! const DWORD len = GetShortPathNameW( reinterpret_cast<LPCWSTR>(path.getStr()), reinterpret_cast<LPWSTR>(&vec[0]), path.getLength() + 1); @@ -316,8 +315,7 @@ namespace /* private */ && extension.getLength()) { const rtl::OUString extPath(path + extension); - std::vector<sal_Unicode, rtl::Allocator<sal_Unicode> > vec2( - extPath.getLength() + 1); + std::vector<sal_Unicode > vec2( extPath.getLength() + 1); const DWORD len2 = GetShortPathNameW( reinterpret_cast<LPCWSTR>(extPath.getStr()), reinterpret_cast<LPWSTR>(&vec2[0]), extPath.getLength() + 1); ret = rtl::OUString(&vec2[0], len2); Modified: openoffice/trunk/main/sal/qa/osl/process/osl_process.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sal/qa/osl/process/osl_process.cxx?rev=1594842&r1=1594841&r2=1594842&view=diff ============================================================================== --- openoffice/trunk/main/sal/qa/osl/process/osl_process.cxx (original) +++ openoffice/trunk/main/sal/qa/osl/process/osl_process.cxx Thu May 15 09:59:27 2014 @@ -44,8 +44,6 @@ #include <tools/postwin.h> #endif -#include "rtl/allocator.hxx" - #include <iostream> #include <fstream> #include <vector> @@ -296,7 +294,7 @@ public: //######################################################### -typedef std::vector<std::string, rtl::Allocator<std::string> > string_container_t; +typedef std::vector<std::string> string_container_t; typedef string_container_t::const_iterator string_container_const_iter_t; typedef string_container_t::iterator string_container_iter_t; Modified: openoffice/trunk/main/sal/rtl/source/bootstrap.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sal/rtl/source/bootstrap.cxx?rev=1594842&r1=1594841&r2=1594842&view=diff ============================================================================== --- openoffice/trunk/main/sal/rtl/source/bootstrap.cxx (original) +++ openoffice/trunk/main/sal/rtl/source/bootstrap.cxx Thu May 15 09:59:27 2014 @@ -41,7 +41,6 @@ #include <rtl/instance.hxx> #include <rtl/malformeduriexception.hxx> #include <rtl/uri.hxx> -#include "rtl/allocator.hxx" #include "macro.hxx" @@ -134,10 +133,7 @@ struct rtl_bootstrap_NameValue {} }; -typedef std::list< - rtl_bootstrap_NameValue, - rtl::Allocator< rtl_bootstrap_NameValue > -> NameValueList; +typedef std::list<rtl_bootstrap_NameValue> NameValueList; bool find( NameValueList const & list, rtl::OUString const & key, @@ -605,10 +601,7 @@ void Bootstrap_Impl::expandValue( namespace { struct bootstrap_map { - typedef std::hash_map< - rtl::OUString, Bootstrap_Impl *, - rtl::OUStringHash, std::equal_to< rtl::OUString >, - rtl::Allocator< OUString > > t; + typedef std::hash_map< const rtl::OUString, Bootstrap_Impl*, rtl::OUStringHash > t; // get and release must only be called properly synchronized via some mutex // (e.g., osl::Mutex::getGlobalMutex()): Modified: openoffice/trunk/main/sal/rtl/source/hash.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sal/rtl/source/hash.cxx?rev=1594842&r1=1594841&r2=1594842&view=diff ============================================================================== --- openoffice/trunk/main/sal/rtl/source/hash.cxx (original) +++ openoffice/trunk/main/sal/rtl/source/hash.cxx Thu May 15 09:59:27 2014 @@ -23,12 +23,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sal.hxx" -#include "rtl/allocator.hxx" #include "hash.h" #include "strimp.h" - #include <hash_set> namespace { @@ -53,8 +51,7 @@ struct UStringEqual } }; -typedef std::hash_set< rtl_uString *, UStringHash, UStringEqual, - rtl::Allocator<rtl_uString *> > StringHashTable; +typedef std::hash_set< rtl_uString *, UStringHash, UStringEqual > StringHashTable; StringHashTable * getHashTable () Modified: openoffice/trunk/main/sal/rtl/source/unload.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sal/rtl/source/unload.cxx?rev=1594842&r1=1594841&r2=1594842&view=diff ============================================================================== --- openoffice/trunk/main/sal/rtl/source/unload.cxx (original) +++ openoffice/trunk/main/sal/rtl/source/unload.cxx Thu May 15 09:59:27 2014 @@ -28,7 +28,6 @@ #include <rtl/ustring.hxx> #include <osl/mutex.hxx> #include <hash_map> -#include "rtl/allocator.hxx" #include <functional> #include <list> @@ -153,11 +152,10 @@ struct hashModule }; typedef std::hash_map< - oslModule, + const oslModule, std::pair<sal_uInt32, component_canUnloadFunc>, hashModule, - std::equal_to<oslModule>, - rtl::Allocator<oslModule> + std::equal_to<oslModule> > ModuleMap; typedef ModuleMap::iterator Mod_IT; @@ -243,7 +241,7 @@ extern "C" void SAL_CALL rtl_unloadUnuse { MutexGuard guard( getUnloadingMutex()); - typedef std::list< oslModule, rtl::Allocator<oslModule> > list_type; + typedef std::list< oslModule > list_type; list_type unloadedModulesList; ModuleMap& moduleMap= getModuleMap(); @@ -302,11 +300,10 @@ struct hashListener }; typedef std::hash_map< - sal_Int32, + const sal_Int32, std::pair<rtl_unloadingListenerFunc, void*>, hashListener, - std::equal_to<sal_Int32>, - rtl::Allocator<sal_Int32> + std::equal_to<sal_Int32> > ListenerMap; typedef ListenerMap::iterator Lis_IT; @@ -333,10 +330,7 @@ static ListenerMap& getListenerMap() // available. Otherwise a new cookie will be provided. // not a new value is returned. -typedef std::deque< - sal_Int32, - rtl::Allocator<sal_Int32> -> queue_type; +typedef std::deque< sal_Int32 > queue_type; static queue_type& getCookieQueue() {