diff options
author | 2020-08-18 12:42:22 -0700 | |
---|---|---|
committer | 2020-08-28 22:13:29 -0700 | |
commit | dc275f8c2a7c2814cfab8372abd5d90993a427e2 (patch) | |
tree | bb360eca22ebb7c9713b0dd0427920bb2db53df0 /tools/validatekeymaps/Main.cpp | |
parent | da9aee03f31885bdcdba5cd8b16c836e28473d1f (diff) |
Move KeyLayoutMap from RefBase to shared_ptr.
Move KeyLayoutMap from inheriting RefBase and use shared_ptr
to store in owner class like KeyMap.
Bug: 160010896
Test: atest inputflinger, atest libinput_tests
Change-Id: I5caca94bfc4a7e038729479a53f09a89d97a1c23
Diffstat (limited to 'tools/validatekeymaps/Main.cpp')
-rw-r--r-- | tools/validatekeymaps/Main.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/validatekeymaps/Main.cpp b/tools/validatekeymaps/Main.cpp index 5ac9dfd2a557..756347179874 100644 --- a/tools/validatekeymaps/Main.cpp +++ b/tools/validatekeymaps/Main.cpp @@ -96,10 +96,9 @@ static bool validateFile(const char* filename) { return false; case FILETYPE_KEYLAYOUT: { - sp<KeyLayoutMap> map; - status_t status = KeyLayoutMap::load(filename, &map); - if (status) { - error("Error %d parsing key layout file.\n\n", status); + base::Result<std::shared_ptr<KeyLayoutMap>> ret = KeyLayoutMap::load(filename); + if (!ret) { + error("Error %s parsing key layout file.\n\n", ret.error().message().c_str()); return false; } break; |