From 973b0f5c5648dbbab365b1c39357e8c36e286759 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sat, 10 Aug 2013 20:17:55 -0500 Subject: [PATCH] Change PFunction's superclass from PNamedType to PSymbol --- src/dobjtype.cpp | 1 - src/dobjtype.h | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/dobjtype.cpp b/src/dobjtype.cpp index c54931a16..c981a00e9 100644 --- a/src/dobjtype.cpp +++ b/src/dobjtype.cpp @@ -253,7 +253,6 @@ void PType::StaticInit() RUNTIME_CLASS(PMap)->TypeTableType = RUNTIME_CLASS(PMap); RUNTIME_CLASS(PStruct)->TypeTableType = RUNTIME_CLASS(PStruct); RUNTIME_CLASS(PPrototype)->TypeTableType = RUNTIME_CLASS(PPrototype); - RUNTIME_CLASS(PFunction)->TypeTableType = RUNTIME_CLASS(PFunction); RUNTIME_CLASS(PClass)->TypeTableType = RUNTIME_CLASS(PClass); TypeTable.AddType(TypeSInt8 = new PInt(1, false)); diff --git a/src/dobjtype.h b/src/dobjtype.h index a6f3bd843..c9ba10f39 100644 --- a/src/dobjtype.h +++ b/src/dobjtype.h @@ -440,9 +440,9 @@ protected: }; // TBD: Should we really support overloading? -class PFunction : public PNamedType +class PFunction : public PSymbol { - DECLARE_CLASS(PFunction, PNamedType); + DECLARE_CLASS(PFunction, PSymbol); public: struct Variant { @@ -452,6 +452,9 @@ public: TArray Variants; size_t PropagateMark(); + + PFunction(FName name) : PSymbol(name) {} + PFunction() : PSymbol(NAME_None) {} }; // Meta-info for every class derived from DObject ---------------------------