diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-10 14:39:07 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-11 06:54:34 +0000 |
commit | 265068d65b39688b8a4756dfbcd46453dd1f9b70 (patch) | |
tree | 6936185b2f2f46b99646d00e542cdde845ef073d /starmath/source/utility.cxx | |
parent | 9e0335d1db22bd3ad3f4bb249b30a00fd55558f4 (diff) |
clang-tidy modernize-loop-convert in scripting to svtools
Change-Id: I98229d14109cf243839d632feabde1391ea9bad5
Reviewed-on: https://gerrit.libreoffice.org/24847
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'starmath/source/utility.cxx')
-rw-r--r-- | starmath/source/utility.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx index 00de175fcbb3..0a1b61ba282e 100644 --- a/starmath/source/utility.cxx +++ b/starmath/source/utility.cxx @@ -55,8 +55,8 @@ SmFontPickList& SmFontPickList::operator = (const SmFontPickList& rList) { Clear(); nMaxItems = rList.nMaxItems; - for (size_t nPos = 0; nPos < rList.aFontVec.size(); nPos++) - aFontVec.push_back( rList.aFontVec[nPos] ); + for (const auto & nPos : rList.aFontVec) + aFontVec.push_back( nPos ); return *this; } @@ -106,10 +106,10 @@ void SmFontPickList::Insert(const vcl::Font &rFont) void SmFontPickList::Update(const vcl::Font &rFont, const vcl::Font &rNewFont) { - for (size_t nPos = 0; nPos < aFontVec.size(); nPos++) - if (CompareItem( aFontVec[nPos], rFont )) + for (vcl::Font & rPos : aFontVec) + if (CompareItem( rPos, rFont )) { - aFontVec[nPos] = rNewFont; + rPos = rNewFont; break; } } |