diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-06-16 10:58:36 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-06-16 10:58:36 +0200 |
commit | f23dd396f515b0d82b0db77d01781f28dd7b2fc8 (patch) | |
tree | 224c4a775f40c48a0e24fa90838468c6d47473aa /unotools/source/config/compatibility.cxx | |
parent | 63965d7dc571c7dce999980737f9d57a7c5151da (diff) |
Local linkage for static var (and drop misleading "m_" prefix)
Change-Id: Ibb66eadf4d10fa4e67dae09287e82dcc937bfea3
Diffstat (limited to 'unotools/source/config/compatibility.cxx')
-rw-r--r-- | unotools/source/config/compatibility.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
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<SvtCompatibilityOptions_Impl> m_pOptions; +namespace { + +std::weak_ptr<SvtCompatibilityOptions_Impl> 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<SvtCompatibilityOptions_Impl>(); - m_pOptions = m_pImpl; + theOptions = m_pImpl; ItemHolder1::holdConfigItem(E_COMPATIBILITY); } } |