summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-12-17 09:14:23 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-12-17 10:15:03 +0100
commite9e57a3dbd8b780e0ae3c9015d757719b893f190 (patch)
tree66423a0b59ff05a011a201c124bea68d0a7c80c5 /svl
parent5a303d68b44415e1c64df1cd83b2bb4da51ac57b (diff)
Elide use of rtl_Instance (which is obsoleted by C++11 thread-safe statics)
Change-Id: Ic7b78dffb2f8d1908f3263d88c5912aec2ebce8b Reviewed-on: https://gerrit.libreoffice.org/85263 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/misc/inethist.cxx17
1 files changed, 2 insertions, 15 deletions
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)