From f1b3d60b2f606b3fd2f96209de3c4d81211ca70b Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 8 Feb 2017 13:37:13 +0100 Subject: [PATCH] - PSymbol does not need to inherit from PTypeBase. This also means that there are no remaining references to any symbol object outside of the symbol tables. --- src/dobject.h | 1 + src/dobjtype.cpp | 14 -------------- src/dobjtype.h | 1 - src/scripting/symbols.cpp | 10 ---------- src/scripting/symbols.h | 15 ++------------- 5 files changed, 3 insertions(+), 38 deletions(-) diff --git a/src/dobject.h b/src/dobject.h index 6ad8ded6f..7c2fd4c22 100644 --- a/src/dobject.h +++ b/src/dobject.h @@ -205,6 +205,7 @@ enum EObjectFlags OF_SerialSuccess = 1 << 9, // For debugging Serialize() calls OF_Sentinel = 1 << 10, // Object is serving as the sentinel in a ring list OF_Transient = 1 << 11, // Object should not be archived (references to it will be nulled on disk) + OF_Released = 1 << 12, // Object was released from the GC system and should not be processed by GC function }; template class TObjPtr; diff --git a/src/dobjtype.cpp b/src/dobjtype.cpp index eda59bcc1..3c556da3b 100644 --- a/src/dobjtype.cpp +++ b/src/dobjtype.cpp @@ -489,20 +489,6 @@ void PNamedType::GetTypeIDs(intptr_t &id1, intptr_t &id2) const id2 = TypeName; } -//========================================================================== -// -// PNamedType :: QualifiedName -// -//========================================================================== - -FString PNamedType::QualifiedName() const -{ - FString out; - if (Outer != nullptr) out = Outer->QualifiedName(); - out << "::" << TypeName; - return out; -} - /* PInt *******************************************************************/ IMPLEMENT_CLASS(PInt, false, false) diff --git a/src/dobjtype.h b/src/dobjtype.h index c999f3f50..cfae5e169 100644 --- a/src/dobjtype.h +++ b/src/dobjtype.h @@ -224,7 +224,6 @@ public: virtual bool IsMatch(intptr_t id1, intptr_t id2) const; virtual void GetTypeIDs(intptr_t &id1, intptr_t &id2) const; - virtual FString QualifiedName() const; }; // Basic types -------------------------------------------------------------- diff --git a/src/scripting/symbols.cpp b/src/scripting/symbols.cpp index ba0704433..68b9d522c 100644 --- a/src/scripting/symbols.cpp +++ b/src/scripting/symbols.cpp @@ -59,16 +59,6 @@ IMPLEMENT_POINTER(Parent) IMPLEMENT_POINTERS_END -//========================================================================== -// -// -// -//========================================================================== - -PSymbol::~PSymbol() -{ -} - //========================================================================== // // diff --git a/src/scripting/symbols.h b/src/scripting/symbols.h index 52d7ac60a..af5bfb80e 100644 --- a/src/scripting/symbols.h +++ b/src/scripting/symbols.h @@ -19,23 +19,12 @@ class PTypeBase : public DObject DECLARE_ABSTRACT_CLASS(PTypeBase, DObject) public: - virtual FString QualifiedName() const - { - return ""; - } }; -class PSymbol : public PTypeBase +class PSymbol : public DObject { - DECLARE_ABSTRACT_CLASS(PSymbol, PTypeBase); + DECLARE_ABSTRACT_CLASS(PSymbol, DObject); public: - virtual ~PSymbol(); - - virtual FString QualifiedName() const - { - return SymbolName.GetChars(); - } - FName SymbolName; protected: