Massive code reduction in the binding utility by using variadic templates.

Extensive code refactoring surrounding the StackStrF helper to facilitate the new changes.
Various other miscellaneous changes and code refactoring to facilitate the new changes.
This commit is contained in:
Sandu Liviu Catalin committed 2018-07-30 00:58:27 +03:00
1 parent 199e9ac502
commit f300e7ff4a
20 files changed
+724 -9507

No files matched your search

+12 -12
View File
@@ -259,9 +259,9 @@ static SQInteger SqBroadcastMsg(HSQUIRRELVM vm)
}
// Attempt to generate the string value
StackStrF val(vm, msgidx, true);
StackStrF val(vm, msgidx);
// Have we failed to retrieve the string?
if (SQ_FAILED(val.mRes))
if (SQ_FAILED(val.Proc(true)))
{
return val.mRes; // Propagate the error!
}
@@ -339,9 +339,9 @@ static SQInteger SqBroadcastMsgP(HSQUIRRELVM vm)
}
// Attempt to generate the string value
StackStrF val(vm, 3, true);
StackStrF val(vm, 3);
// Have we failed to retrieve the string?
if (SQ_FAILED(val.mRes))
if (SQ_FAILED(val.Proc(true)))
{
return val.mRes; // Propagate the error!
}
@@ -444,9 +444,9 @@ static SQInteger SqBroadcastMsgEx(HSQUIRRELVM vm)
}
// Attempt to generate the string value
StackStrF val(vm, msgidx, true);
StackStrF val(vm, msgidx);
// Have we failed to retrieve the string?
if (SQ_FAILED(val.mRes))
if (SQ_FAILED(val.Proc(true)))
{
return val.mRes; // Propagate the error!
}
@@ -508,9 +508,9 @@ static SQInteger SqBroadcastMessage(HSQUIRRELVM vm)
}
// Attempt to generate the string value
StackStrF val(vm, 2, true);
StackStrF val(vm, 2);
// Have we failed to retrieve the string?
if (SQ_FAILED(val.mRes))
if (SQ_FAILED(val.Proc(true)))
{
return val.mRes; // Propagate the error!
}
@@ -564,9 +564,9 @@ static SQInteger SqBroadcastAnnounce(HSQUIRRELVM vm)
}
// Attempt to generate the string value
StackStrF val(vm, 2, true);
StackStrF val(vm, 2);
// Have we failed to retrieve the string?
if (SQ_FAILED(val.mRes))
if (SQ_FAILED(val.Proc(true)))
{
return val.mRes; // Propagate the error!
}
@@ -641,9 +641,9 @@ static SQInteger SqBroadcastAnnounceEx(HSQUIRRELVM vm)
}
// Attempt to generate the string value
StackStrF val(vm, 3, true);
StackStrF val(vm, 3);
// Have we failed to retrieve the string?
if (SQ_FAILED(val.mRes))
if (SQ_FAILED(val.Proc(true)))
{
return val.mRes; // Propagate the error!
}
+2 -2
View File
@@ -499,9 +499,9 @@ public:
return sq_throwerror(vm, e.what());
}
// Attempt to generate the string value
const StackStrF tag(vm, 2, true);
StackStrF tag(vm, 2);
// Have we failed to retrieve the string?
if (SQ_FAILED(tag.mRes))
if (SQ_FAILED(tag.Proc(true)))
{
return tag.mRes; // Propagate the error!
}