diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-05-31 13:31:29 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-06-01 15:21:18 +0100 |
commit | ea121ea4191157fe2fd5114b8d947daa80e35175 (patch) | |
tree | 4a1d37861e43138a33d6319a914fae4f1307a11d /fileaccess | |
parent | 40df9af72f9c5c46f113b4cbfbf443b9da65b3b0 (diff) |
this is overly static + double check lock for little gain
Diffstat (limited to 'fileaccess')
-rw-r--r-- | fileaccess/source/FileAccess.cxx | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/fileaccess/source/FileAccess.cxx b/fileaccess/source/FileAccess.cxx index 775c929f54..1644c2724b 100644 --- a/fileaccess/source/FileAccess.cxx +++ b/fileaccess/source/FileAccess.cxx @@ -852,18 +852,9 @@ Reference< XInterface > SAL_CALL FileAccess_CreateInstance( const Reference< XMu Sequence< rtl::OUString > FileAccess_getSupportedServiceNames() { - static Sequence < rtl::OUString > *pNames = 0; - if( ! pNames ) - { - osl::MutexGuard guard( osl::Mutex::getGlobalMutex() ); - if( !pNames ) - { - static Sequence< rtl::OUString > seqNames(1); - seqNames.getArray()[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SERVICE_NAME )); - pNames = &seqNames; - } - } - return *pNames; + Sequence< rtl::OUString > seqNames(1); + seqNames.getArray()[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SERVICE_NAME )); + return seqNames; } |