summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-02-09 21:02:50 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-02-09 21:03:00 +0100
commit0daab2a9a2c3226bbdbc14cb935a8cdc5f2a61ca (patch)
treeaebbc05539aaa434045f6074a7ad0e3307599fe4
parent255677ab5bb527eb7c61c6c56ed7aa7f46119677 (diff)
Remove static if-statement
-rw-r--r--extensions/source/logging/log_services.cxx19
-rw-r--r--extensions/source/oooimprovecore/oooimprovecore_services.cxx11
2 files changed, 8 insertions, 22 deletions
diff --git a/extensions/source/logging/log_services.cxx b/extensions/source/logging/log_services.cxx
index 9659849d0970..1b3e0e842706 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 6c3a04539e30..0682cdef2947 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();
}
}