diff options
Diffstat (limited to 'sal')
-rw-r--r-- | sal/rtl/bootstrap.cxx | 10 | ||||
-rw-r--r-- | sal/rtl/rtl_process.cxx | 6 | ||||
-rw-r--r-- | sal/textenc/textenc.cxx | 10 |
3 files changed, 10 insertions, 16 deletions
diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx index afb80dcd66cb..52ee7f38d24d 100644 --- a/sal/rtl/bootstrap.cxx +++ b/sal/rtl/bootstrap.cxx @@ -146,8 +146,7 @@ static bool find( namespace { - struct rtl_bootstrap_set_vector : - public rtl::Static< NameValueVector, rtl_bootstrap_set_vector > {}; + NameValueVector rtl_bootstrap_set_vector; } static bool getFromCommandLineArgs( @@ -551,7 +550,7 @@ bool Bootstrap_Impl::getAmbienceValue( { osl::MutexGuard g(osl::Mutex::getGlobalMutex()); - f = find(rtl_bootstrap_set_vector::get(), key, &v); + f = find(rtl_bootstrap_set_vector, key, &v); } if (f || getFromCommandLineArgs(key, &v) || @@ -744,8 +743,7 @@ void SAL_CALL rtl_bootstrap_set ( osl::MutexGuard guard(osl::Mutex::getGlobalMutex()); - NameValueVector& r_rtl_bootstrap_set_vector= rtl_bootstrap_set_vector::get(); - for (auto & item : r_rtl_bootstrap_set_vector) + for (auto & item : rtl_bootstrap_set_vector) { if (item.sName == name) { @@ -756,7 +754,7 @@ void SAL_CALL rtl_bootstrap_set ( SAL_INFO("sal.bootstrap", "explicitly getting: name=" << name << " value=" <<value); - r_rtl_bootstrap_set_vector.emplace_back(name, value); + rtl_bootstrap_set_vector.emplace_back(name, value); } void SAL_CALL rtl_bootstrap_expandMacros_from_handle( diff --git a/sal/rtl/rtl_process.cxx b/sal/rtl/rtl_process.cxx index 42c24e80074d..76963dc1376b 100644 --- a/sal/rtl/rtl_process.cxx +++ b/sal/rtl/rtl_process.cxx @@ -21,7 +21,6 @@ #include <cstring> -#include <rtl/instance.hxx> #include <rtl/process.h> #include <rtl/uuid.h> #include <sal/types.h> @@ -46,13 +45,12 @@ private: sal_uInt8 uuid_[UUID_SIZE]; }; -struct theId: public rtl::Static< Id, theId > {}; - } // end namespace void rtl_getGlobalProcessId(sal_uInt8 * pTargetUUID) { - theId::get().copy(pTargetUUID); + static Id theId; + theId.copy(pTargetUUID); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/textenc/textenc.cxx b/sal/textenc/textenc.cxx index b0856f9add1c..1d7279f849a4 100644 --- a/sal/textenc/textenc.cxx +++ b/sal/textenc/textenc.cxx @@ -27,7 +27,6 @@ #include <cstdlib> #include <osl/module.hxx> -#include <rtl/instance.hxx> #include <rtl/textenc.h> #include <rtl/ustring.h> #include <rtl/ustring.hxx> @@ -409,10 +408,6 @@ private: #endif -struct FullTextEncodingDataSingleton: - public rtl::Static< FullTextEncodingData, FullTextEncodingDataSingleton > -{}; - } ImplTextEncodingData const * @@ -431,7 +426,10 @@ Impl_getTextEncodingData(rtl_TextEncoding nEncoding) case RTL_TEXTENCODING_ISO_8859_1: return &aImplISO88591TextEncodingData; break; default: - return FullTextEncodingDataSingleton::get().get(nEncoding); + { + static FullTextEncodingData gFullTextEncodingData; + return gFullTextEncodingData.get(nEncoding); + } } } |