From 27d585cd2d0a0157896c4af11f2463f0197e3eb2 Mon Sep 17 00:00:00 2001 From: Noel Date: Fri, 18 Dec 2020 20:23:40 +0200 Subject: use more string_view in SfxItemPropertyMap Change-Id: I053dedcbf0b110a61752722d247d6ee5e9ba481d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107977 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svl/source/items/itemprop.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'svl/source/items') diff --git a/svl/source/items/itemprop.cxx b/svl/source/items/itemprop.cxx index f3b7719e36ff..1d8a3f5b1ec1 100644 --- a/svl/source/items/itemprop.cxx +++ b/svl/source/items/itemprop.cxx @@ -35,7 +35,7 @@ using namespace com::sun::star::beans; using namespace com::sun::star::lang; using namespace com::sun::star::uno; -typedef std::unordered_map< OUString, +typedef std::unordered_map< std::u16string_view, SfxItemPropertySimpleEntry > SfxItemPropertyHashMap_t; class SfxItemPropertyMap_Impl : public SfxItemPropertyHashMap_t @@ -72,7 +72,7 @@ SfxItemPropertyMap::~SfxItemPropertyMap() { } -const SfxItemPropertySimpleEntry* SfxItemPropertyMap::getByName( const OUString &rName ) const +const SfxItemPropertySimpleEntry* SfxItemPropertyMap::getByName( std::u16string_view rName ) const { SfxItemPropertyHashMap_t::const_iterator aIter = m_pImpl->find(rName); if( aIter == m_pImpl->end() ) @@ -117,7 +117,7 @@ beans::Property SfxItemPropertyMap::getPropertyByName( const OUString & rName ) return aProp; } -bool SfxItemPropertyMap::hasPropertyByName( const OUString& rName ) const +bool SfxItemPropertyMap::hasPropertyByName( std::u16string_view rName ) const { SfxItemPropertyHashMap_t::const_iterator aIter = m_pImpl->find(rName); return aIter != m_pImpl->end(); -- cgit