diff options
Diffstat (limited to 'editeng/source/lookuptree/Trie.cxx')
-rw-r--r-- | editeng/source/lookuptree/Trie.cxx | 11 |
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); } |