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

Commit 55396a8b authored by Bernie Innocenti's avatar Bernie Innocenti
Browse files

Add explicit Result::ok() checks where needed

Test: m checkbuild continuous_instrumentation_tests continuous_instrumentation_tests_api_coverage continuous_native_tests device-tests platform_tests
Change-Id: I15fee79d55dfbf14b7597b8e5499d5dd4b97f88e
parent 5cad1fa9
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -111,7 +111,7 @@ status_t KeyMap::loadKeyLayout(const InputDeviceIdentifier& deviceIdentifier,
    }
    }


    base::Result<std::shared_ptr<KeyLayoutMap>> ret = KeyLayoutMap::load(path);
    base::Result<std::shared_ptr<KeyLayoutMap>> ret = KeyLayoutMap::load(path);
    if (!ret) {
    if (!ret.ok()) {
        return ret.error().code();
        return ret.error().code();
    }
    }
    keyLayoutMap = *ret;
    keyLayoutMap = *ret;
@@ -129,7 +129,7 @@ status_t KeyMap::loadKeyCharacterMap(const InputDeviceIdentifier& deviceIdentifi


    base::Result<std::shared_ptr<KeyCharacterMap>> ret =
    base::Result<std::shared_ptr<KeyCharacterMap>> ret =
            KeyCharacterMap::load(path, KeyCharacterMap::Format::BASE);
            KeyCharacterMap::load(path, KeyCharacterMap::Format::BASE);
    if (!ret) {
    if (!ret.ok()) {
        return ret.error().code();
        return ret.error().code();
    }
    }
    keyCharacterMap = *ret;
    keyCharacterMap = *ret;