File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -272,14 +272,14 @@ class read_custom_log_plugin final
272272 // Using `named_optional`, we add our argument. You can also use the
273273 // `positional` and/or `named`. See `argument_parser2.hpp`. If you dont need
274274 // any arguments, you can skip this part.
275- auto time_offset = tenzir::duration{0s};
276- parser.named_optional (" time_offset" , time_offset);
275+ auto time_offset = std::optional< tenzir::duration> {0s};
276+ parser.named (" time_offset" , time_offset);
277277 // We let the argument_parser parse our arguments. The TRY macro ensures
278278 // that a parsing failure will stop the setup.
279279 TRY (parser.parse (inv, ctx));
280280 // Create the operator instance, passing in any arguments that the operator
281281 // requires.
282- return std::make_unique<read_custom_log_operator>(time_offset);
282+ return std::make_unique<read_custom_log_operator>(* time_offset);
283283 }
284284};
285285
You can’t perform that action at this time.
0 commit comments