[Libreoffice-commits] core.git: starmath/source
Arkadiy Illarionov (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jul 23 21:33:43 UTC 2019
starmath/source/cfgitem.cxx | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
New commits:
commit 1ba34e905f717f15afabb514d9740d53c85e4af4
Author: Arkadiy Illarionov <qarkai at gmail.com>
AuthorDate: Tue Jul 23 22:20:47 2019 +0300
Commit: Arkadiy Illarionov <qarkai at gmail.com>
CommitDate: Tue Jul 23 23:32:46 2019 +0200
Optimize names transforming
Remove lambda and one extra begin() call.
6ffdc88e79904882e319bdd0b901e7491abae0b3 follow-up
Change-Id: Ieb427704112f4d52c044147a5162921448f0590d
Reviewed-on: https://gerrit.libreoffice.org/76205
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
Reviewed-by: Arkadiy Illarionov <qarkai at gmail.com>
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx
index 5b6b900e051c..4636df044b08 100644
--- a/starmath/source/cfgitem.cxx
+++ b/starmath/source/cfgitem.cxx
@@ -373,9 +373,8 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol,
sal_Int32 nProps = aNames.getLength();
OUString aDelim( "/" );
- std::transform(aNames.begin(), aNames.end(), aNames.begin(),
- [&rBaseNode, &rSymbolName, &aDelim](const OUString& rName) -> OUString {
- return rBaseNode + aDelim + rSymbolName + aDelim + rName; });
+ for (auto& rName : aNames)
+ rName = rBaseNode + aDelim + rSymbolName + aDelim + rName;
const Sequence< Any > aValues = const_cast<SmMathConfig*>(this)->GetProperties(aNames);
@@ -580,9 +579,8 @@ void SmMathConfig::ReadFontFormat( SmFontFormat &rFontFormat,
sal_Int32 nProps = aNames.getLength();
OUString aDelim( "/" );
- std::transform(aNames.begin(), aNames.end(), aNames.begin(),
- [&rBaseNode, &rSymbolName, &aDelim](const OUString& rName) -> OUString {
- return rBaseNode + aDelim + rSymbolName + aDelim + rName; });
+ for (auto& rName : aNames)
+ rName = rBaseNode + aDelim + rSymbolName + aDelim + rName;
const Sequence< Any > aValues = const_cast<SmMathConfig*>(this)->GetProperties(aNames);
More information about the Libreoffice-commits
mailing list