summaryrefslogtreecommitdiff
path: root/editeng/source/lookuptree
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-26 09:08:01 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-04-26 07:43:58 +0000
commit17c4f7f0bc986ed2623a60eea99be01036899af3 (patch)
treece231cac5d9b2d91fb175f22a45bf9dd664057f8 /editeng/source/lookuptree
parent501720afbf226443c1121379efb661d2902113df (diff)
clang-tidy modernize-loop-convert in e*
Change-Id: If56abefa81b41479e3ea9890dee1c43f006086de Reviewed-on: https://gerrit.libreoffice.org/24384 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'editeng/source/lookuptree')
-rw-r--r--editeng/source/lookuptree/Trie.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/editeng/source/lookuptree/Trie.cxx b/editeng/source/lookuptree/Trie.cxx
index 234a8f5e344f..8f2fddbd4bfd 100644
--- a/editeng/source/lookuptree/Trie.cxx
+++ b/editeng/source/lookuptree/Trie.cxx
@@ -41,9 +41,9 @@ TrieNode::TrieNode(sal_Unicode aCharacter) :
mCharacter(aCharacter),
mMarker(false)
{
- for (int i=0; i<LATIN_ARRAY_SIZE; i++)
+ for (TrieNode* & i : mLatinArray)
{
- mLatinArray[i] = nullptr;
+ i = nullptr;
}
}
@@ -55,9 +55,9 @@ TrieNode::~TrieNode()
delete *iNode;
}
- for (int i=0; i<LATIN_ARRAY_SIZE; i++)
+ for (TrieNode* i : mLatinArray)
{
- delete mLatinArray[i];
+ delete i;
}
}
@@ -102,9 +102,8 @@ TrieNode* TrieNode::findChild(sal_Unicode aInputCharacter)
void TrieNode::collectSuggestions(const OUString& sPath, vector<OUString>& rSuggestionList)
{
// first traverse nodes for alphabet characters
- for (int i=0; i<LATIN_ARRAY_SIZE; i++)
+ for (TrieNode* pCurrent : mLatinArray)
{
- TrieNode* pCurrent = mLatinArray[i];
if (pCurrent != nullptr)
collectSuggestionsForCurrentNode(pCurrent, sPath, rSuggestionList);
}