diff options
author | Bernie Innocenti <codewiz@google.com> | 2020-02-06 03:49:33 +0900 |
---|---|---|
committer | Bernie Innocenti <codewiz@google.com> | 2020-02-06 17:04:27 +0000 |
commit | cecebbbaccd36dc2e9f6e80c8e91e57d979963a5 (patch) | |
tree | e866ec8f6bd1eafcc47a7f26d5b957ad787dcfdc /init/action_parser.cpp | |
parent | a6bc86aae72e406c1e90ff25eb3f95b654d9a723 (diff) |
Convert system/core to Result::ok()
No functionality changes, this is a mechanical cleanup.
Test: m
Test: cd system/core && atest
Change-Id: Ifdaa3ce1947ed578f656d5a446978726eb416c36
Diffstat (limited to 'init/action_parser.cpp')
-rw-r--r-- | init/action_parser.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/init/action_parser.cpp b/init/action_parser.cpp index a8e1e09f8..f3168716f 100644 --- a/init/action_parser.cpp +++ b/init/action_parser.cpp @@ -110,14 +110,14 @@ Result<void> ParseTriggers(const std::vector<std::string>& args, Subcontext* sub if (!args[i].compare(0, prop_str.length(), prop_str)) { if (auto result = ParsePropertyTrigger(args[i], subcontext, property_triggers); - !result) { + !result.ok()) { return result; } } else { if (!event_trigger->empty()) { return Error() << "multiple event triggers are not allowed"; } - if (auto result = ValidateEventTrigger(args[i]); !result) { + if (auto result = ValidateEventTrigger(args[i]); !result.ok()) { return result; } @@ -145,8 +145,9 @@ Result<void> ActionParser::ParseSection(std::vector<std::string>&& args, std::string event_trigger; std::map<std::string, std::string> property_triggers; - if (auto result = ParseTriggers(triggers, action_subcontext, &event_trigger, &property_triggers); - !result) { + if (auto result = + ParseTriggers(triggers, action_subcontext, &event_trigger, &property_triggers); + !result.ok()) { return Error() << "ParseTriggers() failed: " << result.error(); } |