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

Commit 7fba3acc authored by Siarhei Vishniakou's avatar Siarhei Vishniakou Committed by Automerger Merge Worker
Browse files

Merge "Pass reference to finishKey" into udc-dev am: f2fcbc8e am: 8d66e8e8

parents 2fe3dda3 8d66e8e8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -227,7 +227,7 @@ private:
        status_t parseMapKey();
        status_t parseKey();
        status_t parseKeyProperty();
        status_t finishKey(Key* key);
        status_t finishKey(Key& key);
        status_t parseModifier(const std::string& token, int32_t* outMetaState);
        status_t parseCharacterLiteral(char16_t* outCharacter);
    };
+5 −5
Original line number Diff line number Diff line
@@ -1048,7 +1048,7 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() {
    String8 token = mTokenizer->nextToken(WHITESPACE_OR_PROPERTY_DELIMITER);
    if (token == "}") {
        mState = STATE_TOP;
        return finishKey(key);
        return finishKey(*key);
    }

    Vector<Property> properties;
@@ -1230,12 +1230,12 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() {
    return NO_ERROR;
}

status_t KeyCharacterMap::Parser::finishKey(Key* key) {
status_t KeyCharacterMap::Parser::finishKey(Key& key) {
    // Fill in default number property.
    if (!key->number) {
    if (!key.number) {
        char16_t digit = 0;
        char16_t symbol = 0;
        for (const Behavior& b : key->behaviors) {
        for (const Behavior& b : key.behaviors) {
            char16_t ch = b.character;
            if (ch) {
                if (ch >= '0' && ch <= '9') {
@@ -1247,7 +1247,7 @@ status_t KeyCharacterMap::Parser::finishKey(Key* key) {
                }
            }
        }
        key->number = digit ? digit : symbol;
        key.number = digit ? digit : symbol;
    }
    return NO_ERROR;
}