[Libreoffice-commits] .: extensions/source
Thomas Arnhold
tarnhold at kemper.freedesktop.org
Wed Feb 9 12:03:21 PST 2011
extensions/source/logging/log_services.cxx | 19 +++--------
extensions/source/oooimprovecore/oooimprovecore_services.cxx | 11 +-----
2 files changed, 8 insertions(+), 22 deletions(-)
New commits:
commit bcdd2c57b318ff7598b7ee584e61d190a7114006
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Wed Feb 9 21:02:50 2011 +0100
Remove static if-statement
diff --git a/extensions/source/logging/log_services.cxx b/extensions/source/logging/log_services.cxx
index 4cf0d54..224febd 100644
--- a/extensions/source/logging/log_services.cxx
+++ b/extensions/source/logging/log_services.cxx
@@ -47,19 +47,12 @@ namespace logging
static void initializeModule()
{
- static bool bInitialized( false );
- if ( !bInitialized )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !bInitialized )
- {
- createRegistryInfo_LoggerPool();
- createRegistryInfo_FileHandler();
- createRegistryInfo_ConsoleHandler();
- createRegistryInfo_PlainTextFormatter();
- createRegistryInfo_CsvFormatter();
- }
- }
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+ createRegistryInfo_LoggerPool();
+ createRegistryInfo_FileHandler();
+ createRegistryInfo_ConsoleHandler();
+ createRegistryInfo_PlainTextFormatter();
+ createRegistryInfo_CsvFormatter();
}
//........................................................................
diff --git a/extensions/source/oooimprovecore/oooimprovecore_services.cxx b/extensions/source/oooimprovecore/oooimprovecore_services.cxx
index 532e9a2..dbfdd4e 100644
--- a/extensions/source/oooimprovecore/oooimprovecore_services.cxx
+++ b/extensions/source/oooimprovecore/oooimprovecore_services.cxx
@@ -37,15 +37,8 @@ namespace oooimprovecore
static void initializeModule()
{
- static bool bInitialized(false);
- if (!bInitialized)
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if (!bInitialized)
- {
- createRegistryInfo_Core();
- }
- }
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+ createRegistryInfo_Core();
}
}
More information about the Libreoffice-commits
mailing list