diff options
-rw-r--r-- | include/svl/inethist.hxx | 6 | ||||
-rw-r--r-- | svl/source/misc/inethist.cxx | 17 |
2 files changed, 2 insertions, 21 deletions
diff --git a/include/svl/inethist.hxx b/include/svl/inethist.hxx index eef642a2b770..21f7b6e2f940 100644 --- a/include/svl/inethist.hxx +++ b/include/svl/inethist.hxx @@ -28,12 +28,6 @@ class INetURLHistory_Impl; class SVL_DLLPUBLIC INetURLHistory final : public SfxBroadcaster { - struct SAL_DLLPRIVATE StaticInstance - { - INetURLHistory * operator()(); - }; - friend INetURLHistory * StaticInstance::operator()(); - /** Representation. */ std::unique_ptr<INetURLHistory_Impl> m_pImpl; diff --git a/svl/source/misc/inethist.cxx b/svl/source/misc/inethist.cxx index 19cae51df5ad..59f54ee80268 100644 --- a/svl/source/misc/inethist.cxx +++ b/svl/source/misc/inethist.cxx @@ -22,9 +22,7 @@ #include <algorithm> #include <string.h> -#include <rtl/instance.hxx> #include <rtl/crc.h> -#include <osl/getglobalmutex.hxx> #include <tools/debug.hxx> #include <tools/urlobj.hxx> @@ -273,15 +271,6 @@ bool INetURLHistory_Impl::queryUrl (const OUString &rUrl) const return (k < capacity()) && (m_pHash[k] == h); } -/* - * INetURLHistory::StaticInstance implementation. - */ -INetURLHistory * INetURLHistory::StaticInstance::operator ()() -{ - static INetURLHistory g_aInstance; - return &g_aInstance; -} - INetURLHistory::INetURLHistory() : m_pImpl (new INetURLHistory_Impl()) { } @@ -295,10 +284,8 @@ INetURLHistory::~INetURLHistory() */ INetURLHistory* INetURLHistory::GetOrCreate() { - return rtl_Instance< - INetURLHistory, StaticInstance, - osl::MutexGuard, osl::GetGlobalMutex >::create ( - StaticInstance(), osl::GetGlobalMutex()); + static INetURLHistory instance; + return &instance; } void INetURLHistory::NormalizeUrl_Impl (INetURLObject &rUrl) |