diff options
author | 2020-12-19 18:47:35 +0900 | |
---|---|---|
committer | 2020-12-20 03:34:58 +0000 | |
commit | 55396a8b42992c573bab6e1946d76a2affcb7805 (patch) | |
tree | 4e4a60155d2aca918983862d9809a6e98df5efa9 | |
parent | 5cad1fa924685ca5c21b260094f92355c5aff682 (diff) |
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
-rw-r--r-- | libs/input/Keyboard.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/input/Keyboard.cpp b/libs/input/Keyboard.cpp index 14dc9e59fb..f0895b32ef 100644 --- a/libs/input/Keyboard.cpp +++ b/libs/input/Keyboard.cpp @@ -111,7 +111,7 @@ status_t KeyMap::loadKeyLayout(const InputDeviceIdentifier& deviceIdentifier, } base::Result<std::shared_ptr<KeyLayoutMap>> ret = KeyLayoutMap::load(path); - if (!ret) { + if (!ret.ok()) { return ret.error().code(); } keyLayoutMap = *ret; @@ -129,7 +129,7 @@ status_t KeyMap::loadKeyCharacterMap(const InputDeviceIdentifier& deviceIdentifi base::Result<std::shared_ptr<KeyCharacterMap>> ret = KeyCharacterMap::load(path, KeyCharacterMap::Format::BASE); - if (!ret) { + if (!ret.ok()) { return ret.error().code(); } keyCharacterMap = *ret; |