mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
modules/vm: Assert options; prevent assignment of eval.
This commit is contained in:
parent
4c44738dc3
commit
b683f1d436
2 changed files with 8 additions and 1 deletions
|
@ -98,6 +98,8 @@ struct ircd::m::vm::eval
|
|||
eval() = default;
|
||||
eval(eval &&) = delete;
|
||||
eval(const eval &) = delete;
|
||||
eval &operator=(eval &&) = delete;
|
||||
eval &operator=(const eval &) = delete;
|
||||
~eval() noexcept;
|
||||
|
||||
static bool for_each(const ctx::ctx *const &, const std::function<bool (eval &)> &);
|
||||
|
|
|
@ -345,7 +345,12 @@ ircd::m::fetch::hook_handler(const event &event,
|
|||
vm::eval &eval)
|
||||
{
|
||||
assert(eval.opts);
|
||||
const auto &opts{*eval.opts};
|
||||
assert(eval.opts->fetch);
|
||||
const auto &opts
|
||||
{
|
||||
*eval.opts
|
||||
};
|
||||
|
||||
const auto &type
|
||||
{
|
||||
at<"type"_>(event)
|
||||
|
|
Loading…
Reference in a new issue