diff options
author | Bernie Innocenti <codewiz@google.com> | 2020-12-22 20:10:32 +0900 |
---|---|---|
committer | Bernie Innocenti <codewiz@google.com> | 2020-12-22 20:15:12 +0900 |
commit | fbc9afb0846cd7404e874f98912d5ca67bf9e977 (patch) | |
tree | ed6f04739fab00e725d0b0d3daca467fcea5a773 /tools/validatekeymaps/Main.cpp | |
parent | 465c67dfd52077d3e8cd93e007cd8c7c178985c7 (diff) |
Add explicit Result::ok() where missing
This is part of a large-scale cleanup to remove operator bool() from
android::base::expected. For more details, see aosp/1533001.
Bug: 176148206
Test: m checkbuild continuous_instrumentation_tests continuous_instrumentation_tests_api_coverage continuous_native_tests device-tests platform_tests
Exempt-From-Owner-Approval: mechanical large-scale change
Change-Id: Ie8cf279c20c9284ad6476280e80dc25545f833de
Diffstat (limited to 'tools/validatekeymaps/Main.cpp')
-rw-r--r-- | tools/validatekeymaps/Main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/validatekeymaps/Main.cpp b/tools/validatekeymaps/Main.cpp index 950473d223fd..991b28071515 100644 --- a/tools/validatekeymaps/Main.cpp +++ b/tools/validatekeymaps/Main.cpp @@ -96,7 +96,7 @@ static bool validateFile(const char* filename) { case FileType::KEY_LAYOUT: { base::Result<std::shared_ptr<KeyLayoutMap>> ret = KeyLayoutMap::load(filename); - if (!ret) { + if (!ret.ok()) { error("Error %s parsing key layout file.\n\n", ret.error().message().c_str()); return false; } @@ -106,7 +106,7 @@ static bool validateFile(const char* filename) { case FileType::KEY_CHARACTER_MAP: { base::Result<std::shared_ptr<KeyCharacterMap>> ret = KeyCharacterMap::load(filename, KeyCharacterMap::Format::ANY); - if (!ret) { + if (!ret.ok()) { error("Error %s parsing key character map file.\n\n", ret.error().message().c_str()); return false; |