l10ntools/source/pocheck.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
New commits: commit 96829f75aa29411060a60c45f9553be3722b5247 Author: Julien Nabet <serval2...@yahoo.fr> Date: Thu Dec 7 20:40:18 2017 +0100 Replace list by vector in pocheck (l10ntools) + use for range loops which included std::list while at it. Change-Id: If80e63e54f6ba39b38f5de92f97642737727e60a Reviewed-on: https://gerrit.libreoffice.org/46039 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/l10ntools/source/pocheck.cxx b/l10ntools/source/pocheck.cxx index fbf42689082f..dc56014b083a 100644 --- a/l10ntools/source/pocheck.cxx +++ b/l10ntools/source/pocheck.cxx @@ -9,7 +9,6 @@ #include <iostream> #include <map> -#include <list> #include <vector> #include <rtl/string.hxx> #include <rtl/ustring.hxx> @@ -21,7 +20,7 @@ static void checkStyleNames(const OString& aLanguage) { std::map<OString,sal_uInt16> aLocalizedStyleNames; std::map<OString,sal_uInt16> aLocalizedNumStyleNames; - std::list<PoEntry> repeatedEntries; + std::vector<PoEntry> repeatedEntries; OString aPoPath = OString(getenv("SRC_ROOT")) + "/translations/source/" + @@ -106,8 +105,9 @@ static void checkStyleNames(const OString& aLanguage) aPoInput.readEntry(aPoEntry); if( aPoInput.eof() ) break; - for ( std::list<PoEntry>::iterator it=repeatedEntries.begin(); it!=repeatedEntries.end(); ++it) { - if (it->getMsgId() == aPoEntry.getMsgId() && it->getGroupId() == aPoEntry.getGroupId()) { + for (auto const& repeatedEntry : repeatedEntries) + { + if (repeatedEntry.getMsgId() == aPoEntry.getMsgId() && repeatedEntry.getGroupId() == aPoEntry.getGroupId()) { bError = true; break; } @@ -135,7 +135,7 @@ static void checkFunctionNames(const OString& aLanguage) std::map<OString,sal_uInt16> aLocalizedFunctionNames; std::map<OString,sal_uInt16> aLocalizedCoreFunctionNames; - std::list<PoEntry> repeatedEntries; + std::vector<PoEntry> repeatedEntries; OString aPoPaths[4]; OUString aPoPathURL; @@ -324,9 +324,9 @@ static void checkFunctionNames(const OString& aLanguage) aPoInput.readEntry(aPoEntry); if( aPoInput.eof() ) break; - for ( std::list<PoEntry>::iterator it=repeatedEntries.begin(); it!=repeatedEntries.end(); ++it) + for (auto const& repeatedEntry : repeatedEntries) { - if (it->getMsgId() == aPoEntry.getMsgId() && it->getGroupId() == aPoEntry.getGroupId()) + if (repeatedEntry.getMsgId() == aPoEntry.getMsgId() && repeatedEntry.getGroupId() == aPoEntry.getGroupId()) { bError = true; break; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits