mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 00:37:15 +01:00
Allow custom parameters to array element generator.
This commit is contained in:
parent
e13d1a91e7
commit
f1654969b8
@ -537,10 +537,10 @@ public:
|
||||
/// \return The Array itself so the call can be chained
|
||||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
template<class F>
|
||||
ArrayBase& AppendFrom(F&& func) {
|
||||
template<class F, class... A>
|
||||
ArrayBase& AppendFrom(F&& func, A &&... a) {
|
||||
sq_pushobject(vm, GetObj());
|
||||
while (func(vm))
|
||||
while (func(vm, std::forward< A >(a)...))
|
||||
{
|
||||
sq_arrayappend(vm, -2);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user