diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-05-31 13:03:18 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-06-01 15:35:10 +0100 |
commit | 9aad6692612fca11230fdcbcaef436d2d1e1c0b4 (patch) | |
tree | 999de0aa5131bc713b0b102a930ab6395e2426d3 /io/source/TextOutputStream | |
parent | 1c33dd6d012f8e3011f5b9df396f004acbc102d0 (diff) |
this is overly static + double check lock for little gain
Diffstat (limited to 'io/source/TextOutputStream')
-rw-r--r-- | io/source/TextOutputStream/TextOutputStream.cxx | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/io/source/TextOutputStream/TextOutputStream.cxx b/io/source/TextOutputStream/TextOutputStream.cxx index b7a3cd384e1d..1f54a64d0633 100644 --- a/io/source/TextOutputStream/TextOutputStream.cxx +++ b/io/source/TextOutputStream/TextOutputStream.cxx @@ -255,18 +255,9 @@ OUString TextOutputStream_getImplementationName() SAL_THROW( () ) Sequence< OUString > TextOutputStream_getSupportedServiceNames() { - static Sequence < OUString > *pNames = 0; - if( ! pNames ) - { - MutexGuard guard( Mutex::getGlobalMutex() ); - if( !pNames ) - { - static Sequence< OUString > seqNames(1); - seqNames.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICE_NAME ) ); - pNames = &seqNames; - } - } - return *pNames; + Sequence< OUString > seqNames(1); + seqNames.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICE_NAME ) ); + return seqNames; } OUString OTextOutputStream::getImplementationName() throw() |