diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:14:16 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:31:24 +0100 |
commit | 217f7f236fd0ef0535cf11de35807bc5f1de9bb6 (patch) | |
tree | f49d8a62e6500bd025853388b5dd9d33de357b9a /editeng/source/lookuptree/Trie.cxx | |
parent | 6bab3811c374e3185ea07e7cb0d08f8b90ef81aa (diff) |
loplugin:nullptr (automatic rewrite)
Change-Id: I9fe00eef7ddcd4a3c87e497a8d62f98e71a0d6d8
Diffstat (limited to 'editeng/source/lookuptree/Trie.cxx')
-rw-r--r-- | editeng/source/lookuptree/Trie.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/editeng/source/lookuptree/Trie.cxx b/editeng/source/lookuptree/Trie.cxx index e148318146b5..1a6dbd16401a 100644 --- a/editeng/source/lookuptree/Trie.cxx +++ b/editeng/source/lookuptree/Trie.cxx @@ -43,7 +43,7 @@ TrieNode::TrieNode(sal_Unicode aCharacter) : { for (int i=0; i<LATIN_ARRAY_SIZE; i++) { - mLatinArray[i] = NULL; + mLatinArray[i] = nullptr; } } @@ -96,7 +96,7 @@ TrieNode* TrieNode::findChild(sal_Unicode aInputCharacter) return pCurrent; } - return NULL; + return nullptr; } void TrieNode::collectSuggestions(const OUString& sPath, vector<OUString>& rSuggestionList) @@ -105,7 +105,7 @@ void TrieNode::collectSuggestions(const OUString& sPath, vector<OUString>& rSugg for (int i=0; i<LATIN_ARRAY_SIZE; i++) { TrieNode* pCurrent = mLatinArray[i]; - if (pCurrent != NULL) + if (pCurrent != nullptr) collectSuggestionsForCurrentNode(pCurrent, sPath, rSuggestionList); } @@ -114,7 +114,7 @@ void TrieNode::collectSuggestions(const OUString& sPath, vector<OUString>& rSugg for(iNode = mChildren.begin(); iNode != mChildren.end(); ++iNode) { TrieNode* pCurrent = *iNode; - if (pCurrent != NULL) + if (pCurrent != nullptr) collectSuggestionsForCurrentNode(pCurrent, sPath, rSuggestionList); } } @@ -138,8 +138,8 @@ TrieNode* TrieNode::traversePath(const OUString& sPath) { sal_Unicode aCurrentChar = sPath[i]; pCurrent = pCurrent->findChild(aCurrentChar); - if ( pCurrent == NULL ) - return NULL; + if ( pCurrent == nullptr ) + return nullptr; } return pCurrent; @@ -171,7 +171,7 @@ void Trie::insert(const OUString& sInputString) const { aCurrentChar = sInputString[i]; TrieNode* pChild = pCurrent->findChild(aCurrentChar); - if ( pChild == NULL ) + if ( pChild == nullptr ) { TrieNode* pNewNode = new TrieNode(aCurrentChar); pCurrent->addNewChild(pNewNode); @@ -190,7 +190,7 @@ void Trie::findSuggestions(const OUString& sWordPart, vector<OUString>& rSuggest { TrieNode* pNode = mRoot->traversePath(sWordPart); - if (pNode != NULL) + if (pNode != nullptr) { pNode->collectSuggestions(sWordPart, rSuggestionList); } |