aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Ouyang <ouyang@google.com>2013-04-17 19:47:37 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-04-17 19:47:37 -0700
commit05da1df8ee0edf26ef7a9b74bb29f0f2f0fb7da2 (patch)
treed4a4aa801489b9c44f13df59f39cfe441e1e339a
parentad3ebcbdd3c75654c40706e4c1111a544d56d466 (diff)
parent880cb6187cfe4ec6632bc2d19d70411210818bc9 (diff)
downloadlatinime-05da1df8ee0edf26ef7a9b74bb29f0f2f0fb7da2.tar.gz
latinime-05da1df8ee0edf26ef7a9b74bb29f0f2f0fb7da2.tar.xz
latinime-05da1df8ee0edf26ef7a9b74bb29f0f2f0fb7da2.zip
am 880cb618: am 3970352e: Make digraph lookups case insensitive
* commit '880cb6187cfe4ec6632bc2d19d70411210818bc9': Make digraph lookups case insensitive
-rw-r--r--native/jni/src/digraph_utils.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/native/jni/src/digraph_utils.cpp b/native/jni/src/digraph_utils.cpp
index 6a1ab0271..083442669 100644
--- a/native/jni/src/digraph_utils.cpp
+++ b/native/jni/src/digraph_utils.cpp
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include "char_utils.h"
#include "binary_format.h"
#include "defines.h"
#include "digraph_utils.h"
@@ -120,10 +121,11 @@ const DigraphUtils::DigraphType DigraphUtils::USED_DIGRAPH_TYPES[] =
/* static */ const DigraphUtils::digraph_t *DigraphUtils::getDigraphForDigraphTypeAndCodePoint(
const DigraphUtils::DigraphType digraphType, const int compositeGlyphCodePoint) {
const DigraphUtils::digraph_t *digraphs = 0;
+ const int compositeGlyphLowerCodePoint = toLowerCase(compositeGlyphCodePoint);
const int digraphsSize =
DigraphUtils::getAllDigraphsForDictionaryAndReturnSize(digraphType, &digraphs);
for (int i = 0; i < digraphsSize; i++) {
- if (digraphs[i].compositeGlyph == compositeGlyphCodePoint) {
+ if (digraphs[i].compositeGlyph == compositeGlyphLowerCodePoint) {
return &digraphs[i];
}
}