remove save_val
parent
9437e0951b
commit
1c56ea36ff
|
@ -84,10 +84,6 @@ void var_changed(thread_state &ts, builtin_var &id, any_value &oldval) {
|
|||
}, val[0]);
|
||||
}
|
||||
|
||||
void var_impl::save_val() {
|
||||
p_override = std::move(p_storage);
|
||||
}
|
||||
|
||||
command *var_impl::get_setter(thread_state &ts) const {
|
||||
switch (p_storage.type()) {
|
||||
case value_type::INTEGER:
|
||||
|
@ -239,7 +235,8 @@ LIBCUBESCRIPT_EXPORT void builtin_var::save(state &cs) {
|
|||
};
|
||||
}
|
||||
if (!(p_impl->p_flags & IDENT_FLAG_OVERRIDDEN)) {
|
||||
static_cast<var_impl *>(p_impl)->save_val();
|
||||
auto *imp = static_cast<var_impl *>(p_impl);
|
||||
imp->p_override = std::move(imp->p_storage);
|
||||
p_impl->p_flags |= IDENT_FLAG_OVERRIDDEN;
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -76,8 +76,6 @@ bool ident_is_callable(ident const *id);
|
|||
struct var_impl: ident_impl, builtin_var {
|
||||
var_impl(string_ref name, int flags);
|
||||
|
||||
void save_val();
|
||||
|
||||
command *get_setter(thread_state &ts) const;
|
||||
|
||||
any_value p_storage{};
|
||||
|
|
Loading…
Reference in New Issue