summaryrefslogtreecommitdiffstats
path: root/comphelper
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-08-13 16:13:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-15 19:17:01 +0200
commit00f257a7ef4f1ec52887bc379c14757e057e94c8 (patch)
tree816bf25723911674850987df481919816c627416 /comphelper
parentSimplify tools::Rectangle a bit (diff)
downloadcore-00f257a7ef4f1ec52887bc379c14757e057e94c8.tar.gz
core-00f257a7ef4f1ec52887bc379c14757e057e94c8.zip
rtl::Static -> thread-safe static local
Change-Id: Iac0501e6aa35cc3d8e62f6b6e68b76cf70233aae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120459 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/namedvaluecollection.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/comphelper/source/misc/namedvaluecollection.cxx b/comphelper/source/misc/namedvaluecollection.cxx
index 0bda6c197267..f572f7136f0d 100644
--- a/comphelper/source/misc/namedvaluecollection.cxx
+++ b/comphelper/source/misc/namedvaluecollection.cxx
@@ -204,19 +204,14 @@ namespace comphelper
return false;
}
- namespace
- {
- class theEmptyDefault : public rtl::Static<Any, theEmptyDefault> {};
- }
-
-
const Any& NamedValueCollection::impl_get( const OUString& _rValueName ) const
{
+ static Any theEmptyDefault;
auto pos = maValues.find( _rValueName );
if ( pos != maValues.end() )
return pos->second;
- return theEmptyDefault::get();
+ return theEmptyDefault;
}