Kaydet (Commit) 18a0d519 authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen

use by-ref iteration, omit pointless std::move() and add missing inline

Change-Id: I45081f5f80c4a571af0abebd23a4fed6623498a0
üst d05c7c62
...@@ -18,18 +18,18 @@ ...@@ -18,18 +18,18 @@
namespace comphelper 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) ::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())}; ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> vResult{static_cast<sal_Int32>(vInit.size())};
size_t nCount{0}; size_t nCount{0};
for(auto aEntry : vInit) for(const auto& aEntry : vInit)
{ {
vResult[nCount].Name = std::move(aEntry.first); vResult[nCount].Name = aEntry.first;
vResult[nCount].Value = std::move(aEntry.second); vResult[nCount].Value = aEntry.second;
++nCount; ++nCount;
} }
return std::move(vResult); return vResult;
} }
} // namespace comphelper } // namespace comphelper
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment