diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-14 08:16:35 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-14 08:17:32 +0200 |
commit | d366c9b20ec86f3fe521812a0c22def3bfd1f05e (patch) | |
tree | 4bd09438c8cd8f0dbcd0881fc923d56a0a721fc5 /editeng/source/lookuptree | |
parent | d2fa59e4025050c9b668ecff379d668f0db52639 (diff) |
remove unnecessary sal_Unicode casts in various places
Change-Id: Ibf04062ca86ed866202d748c3b62a210d30ed6ec
Diffstat (limited to 'editeng/source/lookuptree')
-rw-r--r-- | editeng/source/lookuptree/LatinLookupTree.cxx | 8 | ||||
-rw-r--r-- | editeng/source/lookuptree/LatinTreeNode.cxx | 4 | ||||
-rw-r--r-- | editeng/source/lookuptree/Trie.cxx | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/editeng/source/lookuptree/LatinLookupTree.cxx b/editeng/source/lookuptree/LatinLookupTree.cxx index 0762044ef0f7..cdc0a0b376a6 100644 --- a/editeng/source/lookuptree/LatinLookupTree.cxx +++ b/editeng/source/lookuptree/LatinLookupTree.cxx @@ -146,8 +146,8 @@ void LatinLookupTree::clear() bool LatinLookupTree::isSeparatedlyHandled(const sal_Unicode cKey) const { return - ( cKey >= sal_Unicode('a') && cKey <= sal_Unicode('z') ) - || ( cKey >= sal_Unicode('A') && cKey <= sal_Unicode('Z') ); + ( cKey >= 'a' && cKey <= 'z' ) + || ( cKey >= 'A' && cKey <= 'Z' ); } Node*& LatinLookupTree::getChildRef(const sal_Unicode cKey, bool bCreatePlaceholder) @@ -155,11 +155,11 @@ Node*& LatinLookupTree::getChildRef(const sal_Unicode cKey, bool bCreatePlacehol int pos = -1; // determine position in array if possible - if ( cKey >= sal_Unicode('a') && cKey <= sal_Unicode('z') ) + if ( cKey >= 'a' && cKey <= 'z' ) { pos = cKey - our_nLowerCaseA; } - else if ( cKey >= sal_Unicode('A') && cKey <= sal_Unicode('Z') ) + else if ( cKey >= 'A' && cKey <= 'Z' ) { pos = cKey - our_nUpperCaseA + 26; } diff --git a/editeng/source/lookuptree/LatinTreeNode.cxx b/editeng/source/lookuptree/LatinTreeNode.cxx index b68e039d1349..a7f10aa5dd5a 100644 --- a/editeng/source/lookuptree/LatinTreeNode.cxx +++ b/editeng/source/lookuptree/LatinTreeNode.cxx @@ -36,13 +36,13 @@ LatinTreeNode::~LatinTreeNode() bool LatinTreeNode::isSeparatedlyHandled(const sal_Unicode cKey) const { - return ( cKey >= sal_Unicode('a') && cKey <= sal_Unicode('z') ); + return ( cKey >= 'a' && cKey <= 'z' ); } Node*& LatinTreeNode::getChildRef(const sal_Unicode cKey, bool bCreatePlaceholder) { // determine position in array if possible - if ( cKey >= sal_Unicode('a') && cKey <= sal_Unicode('z') ) + if ( cKey >= 'a' && cKey <= 'z' ) { return m_pLeaves[cKey - LatinLookupTree::our_nLowerCaseA]; } diff --git a/editeng/source/lookuptree/Trie.cxx b/editeng/source/lookuptree/Trie.cxx index 4fbc19430bdb..9314069793ac 100644 --- a/editeng/source/lookuptree/Trie.cxx +++ b/editeng/source/lookuptree/Trie.cxx @@ -68,8 +68,8 @@ void TrieNode::markWord() void TrieNode::addNewChild(TrieNode* pChild) { - if (pChild->mCharacter >= sal_Unicode('a') && - pChild->mCharacter <= sal_Unicode('z')) + if (pChild->mCharacter >= 'a' && + pChild->mCharacter <= 'z') { mLatinArray[pChild->mCharacter - sal_Unicode('a')] = pChild; } @@ -81,8 +81,8 @@ void TrieNode::addNewChild(TrieNode* pChild) TrieNode* TrieNode::findChild(sal_Unicode aInputCharacter) { - if (aInputCharacter >= sal_Unicode('a') && - aInputCharacter <= sal_Unicode('z')) + if (aInputCharacter >= 'a' && + aInputCharacter <= 'z') { return mLatinArray[aInputCharacter - sal_Unicode('a')]; } |