Fix LUI std::optional + cleanup
This commit is contained in:
parent
7fd6db31ca
commit
6745473ac3
@ -437,16 +437,6 @@ namespace ui_scripting
|
||||
return this->get_raw().v.native == other.get_raw().v.native;
|
||||
}
|
||||
|
||||
arguments script_value::operator()() const
|
||||
{
|
||||
return this->as<function>()();
|
||||
}
|
||||
|
||||
arguments script_value::operator()(const arguments& arguments) const
|
||||
{
|
||||
return this->as<function>()(arguments);
|
||||
}
|
||||
|
||||
function_argument::function_argument(const arguments& args, const script_value& value, const int index)
|
||||
: values_(args)
|
||||
, value_(value)
|
||||
|
@ -136,24 +136,14 @@ namespace ui_scripting
|
||||
{
|
||||
}
|
||||
|
||||
template <typename F>
|
||||
script_value(const std::optional<F> optional)
|
||||
template <typename T>
|
||||
script_value(const std::optional<T>& optional)
|
||||
: script_value(optional.has_value() ? script_value(optional.value()) : script_value())
|
||||
{
|
||||
if (optional.has_value())
|
||||
{
|
||||
script_value::script_value(optional.value());
|
||||
}
|
||||
else
|
||||
{
|
||||
script_value::script_value();
|
||||
}
|
||||
}
|
||||
|
||||
bool operator==(const script_value& other) const;
|
||||
|
||||
arguments operator()() const;
|
||||
arguments operator()(const arguments& arguments) const;
|
||||
|
||||
template<class ...T>
|
||||
arguments operator()(T... arguments) const
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user