summaryrefslogtreecommitdiff
path: root/init/action_parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'init/action_parser.cpp')
-rw-r--r--init/action_parser.cpp9
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();
}