Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 880cb618 authored by Tom Ouyang's avatar Tom Ouyang Committed by Android Git Automerger
Browse files

am 3970352e: Make digraph lookups case insensitive

* commit '3970352e':
  Make digraph lookups case insensitive
parents ef83a2eb 3970352e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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];
        }
    }