mirror of
https://github.com/matrix-construct/construct
synced 2024-10-02 13:48:53 +02: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() = default;
|
||||||
eval(eval &&) = delete;
|
eval(eval &&) = delete;
|
||||||
eval(const eval &) = delete;
|
eval(const eval &) = delete;
|
||||||
|
eval &operator=(eval &&) = delete;
|
||||||
|
eval &operator=(const eval &) = delete;
|
||||||
~eval() noexcept;
|
~eval() noexcept;
|
||||||
|
|
||||||
static bool for_each(const ctx::ctx *const &, const std::function<bool (eval &)> &);
|
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)
|
vm::eval &eval)
|
||||||
{
|
{
|
||||||
assert(eval.opts);
|
assert(eval.opts);
|
||||||
const auto &opts{*eval.opts};
|
assert(eval.opts->fetch);
|
||||||
|
const auto &opts
|
||||||
|
{
|
||||||
|
*eval.opts
|
||||||
|
};
|
||||||
|
|
||||||
const auto &type
|
const auto &type
|
||||||
{
|
{
|
||||||
at<"type"_>(event)
|
at<"type"_>(event)
|
||||||
|
|
Loading…
Reference in a new issue