C++: Support of dynamic model and if expression

This commit is contained in:
Olivier Goffart 2020-07-03 17:37:07 +02:00
parent 20369c7fc7
commit 90532e80d2
3 changed files with 100 additions and 51 deletions

View file

@ -112,12 +112,12 @@ struct PropertyListenerScope
}
template<typename F>
bool evaluate(F &f) const {
return internal::sixtyfps_property_listener_scope_evaluate(
void evaluate(const F &f) const {
internal::sixtyfps_property_listener_scope_evaluate(
&inner,
[](void *f){ (*reinterpret_cast<F*>(f))(); },
&f
);
[](void *f){ (*reinterpret_cast<const F*>(f))(); },
const_cast<F*>(&f)
);
}
private: