diff options
author | Siarhei Vishniakou <svv@google.com> | 2019-02-20 16:26:12 -0600 |
---|---|---|
committer | Siarhei Vishniakou <svv@google.com> | 2019-02-20 16:26:12 -0600 |
commit | 457b1601e1ff5dff435df98633881e67b17e5c24 (patch) | |
tree | 362f6f075516dece1f32c65570e3bd9351e5bc7c /tools/validatekeymaps/Main.cpp | |
parent | dca779140d506bec4e81d4cedf61e9bf3d8b8a6f (diff) |
Update VirtualKeyMap usage
Since the VirtualKeyMap has been refactored, updated the
validation tool to use the new signature.
Bug: 113575658
Test: atest libinput_tests inputflinger_tests
Change-Id: Ifb0eb5b2913020f1e1402dcb6a36c9038c345807
Diffstat (limited to 'tools/validatekeymaps/Main.cpp')
-rw-r--r-- | tools/validatekeymaps/Main.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/validatekeymaps/Main.cpp b/tools/validatekeymaps/Main.cpp index f31f771004bd..56a242f1daaf 100644 --- a/tools/validatekeymaps/Main.cpp +++ b/tools/validatekeymaps/Main.cpp @@ -128,13 +128,11 @@ static bool validateFile(const char* filename) { } case FILETYPE_VIRTUALKEYDEFINITION: { - VirtualKeyMap* map; - status_t status = VirtualKeyMap::load(filename, &map); - if (status) { - error("Error %d parsing virtual key definition file.\n\n", status); + std::unique_ptr<VirtualKeyMap> map = VirtualKeyMap::load(filename); + if (!map) { + error("Error while parsing virtual key definition file.\n\n"); return false; } - delete map; break; } } |