[Libreoffice-commits] core.git: svtools/source

Stephan Bergmann sbergman at redhat.com
Thu Jun 16 09:01:46 UTC 2016


 svtools/source/config/toolpanelopt.cxx |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit e6ed4ba3ac4c5fae2bbdca9c21728d68a1f386fa
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jun 16 11:01:07 2016 +0200

    Local linkage for static var (and drop misleading "m_" prefix)
    
    Change-Id: Ide9d2262192899f7a1444760c0df806d30514919

diff --git a/svtools/source/config/toolpanelopt.cxx b/svtools/source/config/toolpanelopt.cxx
index 5294886..1b8929b 100644
--- a/svtools/source/config/toolpanelopt.cxx
+++ b/svtools/source/config/toolpanelopt.cxx
@@ -297,18 +297,22 @@ Sequence< OUString > SvtToolPanelOptions_Impl::GetPropertyNames()
     return Sequence< OUString >( pProperties, SAL_N_ELEMENTS( pProperties ) );
 }
 
-std::weak_ptr<SvtToolPanelOptions_Impl> m_pOptions;
+namespace {
+
+std::weak_ptr<SvtToolPanelOptions_Impl> theOptions;
+
+}
 
 SvtToolPanelOptions::SvtToolPanelOptions()
 {
     // Global access, must be guarded (multithreading!).
     MutexGuard aGuard( GetInitMutex() );
 
-    m_pImpl = m_pOptions.lock();
+    m_pImpl = theOptions.lock();
     if( !m_pImpl )
     {
        m_pImpl = std::make_shared<SvtToolPanelOptions_Impl>();
-       m_pOptions = m_pImpl;
+       theOptions = m_pImpl;
     }
 }
 


More information about the Libreoffice-commits mailing list