diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2015-02-24 17:25:49 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2015-02-24 18:12:40 +0100 |
commit | 18a0d519440b42cd90c628730b2e404b4203e8eb (patch) | |
tree | 2a8447358dd60fc55d0e4e9d1358e80edb3b6033 /include/comphelper | |
parent | d05c7c6287f76ed023a32ff592ff2e8db05926dc (diff) |
use by-ref iteration, omit pointless std::move() and add missing inline
Change-Id: I45081f5f80c4a571af0abebd23a4fed6623498a0
Diffstat (limited to 'include/comphelper')
-rw-r--r-- | include/comphelper/propertysequence.hxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/comphelper/propertysequence.hxx b/include/comphelper/propertysequence.hxx index ce28e4f813ce..7cd9494082c2 100644 --- a/include/comphelper/propertysequence.hxx +++ b/include/comphelper/propertysequence.hxx @@ -18,18 +18,18 @@ namespace comphelper { - ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > InitPropertySequence( + inline ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > InitPropertySequence( ::std::initializer_list< ::std::pair< OUString, ::com::sun::star::uno::Any > > vInit) { ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> vResult{static_cast<sal_Int32>(vInit.size())}; size_t nCount{0}; - for(auto aEntry : vInit) + for(const auto& aEntry : vInit) { - vResult[nCount].Name = std::move(aEntry.first); - vResult[nCount].Value = std::move(aEntry.second); + vResult[nCount].Name = aEntry.first; + vResult[nCount].Value = aEntry.second; ++nCount; } - return std::move(vResult); + return vResult; } } // namespace comphelper |