diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-13 16:13:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-15 19:17:01 +0200 |
commit | 00f257a7ef4f1ec52887bc379c14757e057e94c8 (patch) | |
tree | 816bf25723911674850987df481919816c627416 /desktop/source | |
parent | 6c12c659fb22aeab1d1d5d0e8298662e2a602499 (diff) |
rtl::Static -> thread-safe static local
Change-Id: Iac0501e6aa35cc3d8e62f6b6e68b76cf70233aae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120459
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/app/app.cxx | 5 | ||||
-rw-r--r-- | desktop/source/app/officeipcthread.cxx | 9 |
2 files changed, 4 insertions, 10 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index ade68fd5efc0..f65f93d63f80 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -383,13 +383,12 @@ void FatalError(const OUString& sMessage) _exit(EXITHELPER_FATAL_ERROR); } -struct theCommandLineArgs : public rtl::Static< CommandLineArgs, theCommandLineArgs > {}; - } CommandLineArgs& Desktop::GetCommandLineArgs() { - return theCommandLineArgs::get(); + static CommandLineArgs theCommandLineArgs; + return theCommandLineArgs; } OUString ReplaceStringHookProc( const OUString& rStr ) diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index a0e6b98cc006..61827856f3e9 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -635,15 +635,10 @@ void DbusIpcThread::close() { #endif -namespace -{ - class theRequestHandlerMutex - : public rtl::Static<osl::Mutex, theRequestHandlerMutex> {}; -} - ::osl::Mutex& RequestHandler::GetMutex() { - return theRequestHandlerMutex::get(); + static ::osl::Mutex theRequestHandlerMutex; + return theRequestHandlerMutex; } void RequestHandler::SetDowning() |