mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-02-22 04:37:13 +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
|
/// \return The Array itself so the call can be chained
|
||||||
///
|
///
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
template<class F>
|
template<class F, class... A>
|
||||||
ArrayBase& AppendFrom(F&& func) {
|
ArrayBase& AppendFrom(F&& func, A &&... a) {
|
||||||
sq_pushobject(vm, GetObj());
|
sq_pushobject(vm, GetObj());
|
||||||
while (func(vm))
|
while (func(vm, std::forward< A >(a)...))
|
||||||
{
|
{
|
||||||
sq_arrayappend(vm, -2);
|
sq_arrayappend(vm, -2);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user