diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2017-06-06 11:02:09 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-06 20:58:18 +0200 |
commit | cbcaff7510d557d345c15db97f52633c81939d41 (patch) | |
tree | 745ebaa1a384a290bd408288f542e356a20f9027 /ucb/source/ucp/cmis | |
parent | ca8a4a7abc81a53a88fc0daa61447f9562f532f5 (diff) |
ucb: replace double checked locking patterns
with thread safe local statics
and prefix statics
Change-Id: Iaa7c9056847f75612d6cf6c6e44d3896fca734de
Reviewed-on: https://gerrit.libreoffice.org/38433
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb/source/ucp/cmis')
-rw-r--r-- | ucb/source/ucp/cmis/cmis_content.cxx | 8 | ||||
-rw-r--r-- | ucb/source/ucp/cmis/cmis_repo_content.cxx | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx index def0db069191..4a8e75c65837 100644 --- a/ucb/source/ucp/cmis/cmis_content.cxx +++ b/ucb/source/ucp/cmis/cmis_content.cxx @@ -1946,7 +1946,7 @@ namespace cmis { if ( isFolder( uno::Reference< ucb::XCommandEnvironment >() ) ) { - static cppu::OTypeCollection aFolderCollection + static cppu::OTypeCollection s_aFolderCollection (CPPU_TYPE_REF( lang::XTypeProvider ), CPPU_TYPE_REF( lang::XServiceInfo ), CPPU_TYPE_REF( lang::XComponent ), @@ -1958,7 +1958,7 @@ namespace cmis CPPU_TYPE_REF( beans::XPropertySetInfoChangeNotifier ), CPPU_TYPE_REF( container::XChild ), CPPU_TYPE_REF( ucb::XContentCreator ) ); - return aFolderCollection.getTypes(); + return s_aFolderCollection.getTypes(); } } catch (const uno::RuntimeException&) @@ -1973,7 +1973,7 @@ namespace cmis uno::Reference<uno::XInterface>(), a); } - static cppu::OTypeCollection aFileCollection + static cppu::OTypeCollection s_aFileCollection (CPPU_TYPE_REF( lang::XTypeProvider ), CPPU_TYPE_REF( lang::XServiceInfo ), CPPU_TYPE_REF( lang::XComponent ), @@ -1985,7 +1985,7 @@ namespace cmis CPPU_TYPE_REF( beans::XPropertySetInfoChangeNotifier ), CPPU_TYPE_REF( container::XChild ) ); - return aFileCollection.getTypes(); + return s_aFileCollection.getTypes(); } uno::Sequence< ucb::ContentInfo > Content::queryCreatableContentsInfo( diff --git a/ucb/source/ucp/cmis/cmis_repo_content.cxx b/ucb/source/ucp/cmis/cmis_repo_content.cxx index 208271edf104..e1754666879d 100644 --- a/ucb/source/ucp/cmis/cmis_repo_content.cxx +++ b/ucb/source/ucp/cmis/cmis_repo_content.cxx @@ -384,7 +384,7 @@ namespace cmis uno::Sequence< uno::Type > SAL_CALL RepoContent::getTypes() { - static cppu::OTypeCollection aFolderCollection + static cppu::OTypeCollection s_aFolderCollection (CPPU_TYPE_REF( lang::XTypeProvider ), CPPU_TYPE_REF( lang::XServiceInfo ), CPPU_TYPE_REF( lang::XComponent ), @@ -395,7 +395,7 @@ namespace cmis CPPU_TYPE_REF( beans::XPropertyContainer ), CPPU_TYPE_REF( beans::XPropertySetInfoChangeNotifier ), CPPU_TYPE_REF( container::XChild ) ); - return aFolderCollection.getTypes(); + return s_aFolderCollection.getTypes(); } list< uno::Reference< ucb::XContent > > RepoContent::getChildren( ) |