From 26fc87c6827e9d86c5b7cf7aa216f0a60ab28411 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 12 Apr 2021 17:01:01 +0200 Subject: [PATCH] make SfxItemPropertySimpleEntry constructor explicit Change-Id: I09d6045320b44746fbdb103db884c214e0509a78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114012 Tested-by: Jenkins Reviewed-by: Noel Grandin --- include/svl/itemprop.hxx | 2 +- svl/source/items/itemprop.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/svl/itemprop.hxx b/include/svl/itemprop.hxx index 0fbbeaf08cb0..6403dbbc1fa6 100644 --- a/include/svl/itemprop.hxx +++ b/include/svl/itemprop.hxx @@ -94,7 +94,7 @@ struct SfxItemPropertySimpleEntry assert(_nFlags <= 0x1ff ); } - SfxItemPropertySimpleEntry( const SfxItemPropertyMapEntry& rMapEntry ) + explicit SfxItemPropertySimpleEntry( const SfxItemPropertyMapEntry& rMapEntry ) : aType( rMapEntry.aType ) , nWID( rMapEntry.nWID ) , nFlags( rMapEntry.nFlags ) diff --git a/svl/source/items/itemprop.cxx b/svl/source/items/itemprop.cxx index 7898464b9b84..57e44a7f861a 100644 --- a/svl/source/items/itemprop.cxx +++ b/svl/source/items/itemprop.cxx @@ -39,7 +39,7 @@ SfxItemPropertyMap::SfxItemPropertyMap( const SfxItemPropertyMapEntry* pEntries { while( !pEntries->aName.empty() ) { - m_aMap[ pEntries->aName ] = *pEntries; + m_aMap.emplace( pEntries->aName, *pEntries ); ++pEntries; } }