From 21a00e20b7cc9e79b64520a36be96ec8f69eeec4 Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Sun, 3 Mar 2019 13:38:24 +0200 Subject: [PATCH] Allow PushVars to work when there are no parameters as well. --- include/sqrat/sqratTypes.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/sqrat/sqratTypes.h b/include/sqrat/sqratTypes.h index b340cefc..720a9544 100644 --- a/include/sqrat/sqratTypes.h +++ b/include/sqrat/sqratTypes.h @@ -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 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 inline void PushVars(HSQUIRRELVM vm, T value, Ts &&... tail) {