Better handling of creating EvalValues in UserData templates
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-06-28 18:31:24 +02:00
parent 70f2dea0ce
commit eda15e501d
4 changed files with 66 additions and 1 deletions

View File

@@ -92,7 +92,7 @@
*/
#define PORYGON_PREPARE_FUNCTION(userDataTypeName, fieldName, returnType, ...) \
static Porygon::Evaluation::EvalValue* invoke__##fieldName(void* obj, Porygon::Evaluation::EvalValue* par[], int parameterCount){ \
return new returnType(((userDataTypeName*)obj)->fieldName( \
return Porygon::Evaluation::EvalValueHelper::Create(((userDataTypeName*)obj)->fieldName( \
__VA_ARGS__ \
));}