From f23dd396f515b0d82b0db77d01781f28dd7b2fc8 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 16 Jun 2016 10:58:36 +0200 Subject: Local linkage for static var (and drop misleading "m_" prefix) Change-Id: Ibb66eadf4d10fa4e67dae09287e82dcc937bfea3 --- unotools/source/config/compatibility.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'unotools') diff --git a/unotools/source/config/compatibility.cxx b/unotools/source/config/compatibility.cxx index 0d2fa73f1be3..4460b5eae04b 100644 --- a/unotools/source/config/compatibility.cxx +++ b/unotools/source/config/compatibility.cxx @@ -580,18 +580,22 @@ void SvtCompatibilityOptions_Impl::impl_ExpandPropertyNames( } } -std::weak_ptr m_pOptions; +namespace { + +std::weak_ptr theOptions; + +} SvtCompatibilityOptions::SvtCompatibilityOptions() { // Global access, must be guarded (multithreading!). MutexGuard aGuard( GetOwnStaticMutex() ); - m_pImpl = m_pOptions.lock(); + m_pImpl = theOptions.lock(); if( !m_pImpl ) { m_pImpl = std::make_shared(); - m_pOptions = m_pImpl; + theOptions = m_pImpl; ItemHolder1::holdConfigItem(E_COMPATIBILITY); } } -- cgit