diff --git a/src/dobject.h b/src/dobject.h index 22ebf13050..d6bae3dad1 100644 --- a/src/dobject.h +++ b/src/dobject.h @@ -36,6 +36,7 @@ #include #include "doomtype.h" +#include "i_system.h" class PClass; @@ -202,8 +203,8 @@ protected: \ PClass *cls::StaticType() const { return RegistrationInfo.MyClass; } #define IMPLEMENT_CLASS(cls, isabstract, ptrs, fields, vmexport) \ - _X_CONSTRUCTOR_##isabstract##(cls) \ - _IMP_PCLASS(cls, _X_POINTERS_##ptrs##(cls), _X_ABSTRACT_##isabstract##(cls), _X_FIELDS_##fields##(cls), _X_VMEXPORT_##vmexport##(cls)) + _X_CONSTRUCTOR_##isabstract(cls) \ + _IMP_PCLASS(cls, _X_POINTERS_##ptrs(cls), _X_ABSTRACT_##isabstract(cls), _X_FIELDS_##fields(cls), _X_VMEXPORT_##vmexport(cls)) // Taking the address of a field in an object at address 1 instead of // address 0 keeps GCC from complaining about possible misuse of offsetof. @@ -644,15 +645,15 @@ private: public: void Destroy() { - ExportedNatives::Get()->Destroy(this); + ExportedNatives::Get()->template Destroy(this); } void Tick() { - ExportedNatives::Get()->Tick(this); + ExportedNatives::Get()->template Tick(this); } AInventory *DropInventory(AInventory *item) { - return ExportedNatives::Get()->DropInventory(this, item); + return ExportedNatives::Get()->template DropInventory(this, item); } }; diff --git a/src/scripting/zscript/zcc_compile.cpp b/src/scripting/zscript/zcc_compile.cpp index a2e2262f28..7d338cc699 100644 --- a/src/scripting/zscript/zcc_compile.cpp +++ b/src/scripting/zscript/zcc_compile.cpp @@ -2244,8 +2244,9 @@ FxExpression *ZCCCompiler::SetupActionFunction(PClass *cls, ZCC_TreeNode *af) { if (fc->Parameters == nullptr && !(afd->Variants[0].Flags & VARF_Virtual)) { + FArgumentList argumentlist; // We can use this function directly without wrapping it in a caller. - return new FxVMFunctionCall(new FxSelf(*af), afd, FArgumentList(), *af, false); + return new FxVMFunctionCall(new FxSelf(*af), afd, argumentlist, *af, false); } } else