From 8d01ba77339b2fdbcde36077929c106c6591e787 Mon Sep 17 00:00:00 2001 From: Edoardo Prezioso Date: Fri, 11 Nov 2016 15:22:53 +0100 Subject: [PATCH] - Fixed Clang errors with delayed templates on. --- src/dobject.h | 11 ++++++----- src/scripting/zscript/zcc_compile.cpp | 3 ++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/dobject.h b/src/dobject.h index 22ebf1305..d6bae3dad 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 a2e2262f2..7d338cc69 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