1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00

Allow PushVars to work when there are no parameters as well.

This commit is contained in:
Sandu Liviu Catalin 2019-03-03 13:38:24 +02:00
parent 600c21d45f
commit 21a00e20b7

View File

@ -1168,7 +1168,12 @@ inline void PushVar(HSQUIRRELVM vm, const T& value) {
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Pushes a pack of values on to a given VM's stack
/// Pushes a pack of values on to a given VM's stack. Special case for when there are no arguments to push.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
inline void PushVars(HSQUIRRELVM /*vm*/) { }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Pushes a pack of values on to a given VM's stack. Special case for when there is a single argument left to push.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template<class T>
inline void PushVars(HSQUIRRELVM vm, T value) {
@ -1176,7 +1181,7 @@ inline void PushVars(HSQUIRRELVM vm, T value) {
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Pushes a pack of values on to a given VM's stack
/// Pushes a pack of values on to a given VM's stack. Primary implementation which recursively pushes the parameters.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template<class T, class... Ts>
inline void PushVars(HSQUIRRELVM vm, T value, Ts &&... tail) {