File tree Expand file tree Collapse file tree 4 files changed +6
-35
lines changed
GeneralsMD/Code/GameEngine/Include
Generals/Code/GameEngine/Include Expand file tree Collapse file tree 4 files changed +6
-35
lines changed Original file line number Diff line number Diff line change @@ -914,22 +914,6 @@ class MemoryPoolObjectHolder
914
914
};
915
915
916
916
917
- // ----------------------------------------------------------------------------
918
- /* *
919
- Sometimes you want to make a class's destructor protected so that it can only
920
- be destroyed under special circumstances. MemoryPoolObject short-circuits this
921
- by making the destructor always be protected, and the true delete technique
922
- (namely, deleteInstance) always public by default. You can simulate the behavior
923
- you really want by including this macro
924
- */
925
- #define MEMORY_POOL_DELETEINSTANCE_VISIBILITY (ARGVIS )\
926
- ARGVIS: \
927
- static void deleteInstance (MemoryPoolObject* object) { \
928
- MemoryPoolObject::deleteInstance (object); \
929
- } \
930
- public:
931
-
932
-
933
917
#define EMPTY_DTOR (CLASS ) inline CLASS::~CLASS () { }
934
918
935
919
#endif // _GAME_MEMORY_H_
Original file line number Diff line number Diff line change @@ -158,8 +158,6 @@ class Object : public Thing, public Snapshot
158
158
{
159
159
160
160
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE (Object, " ObjectPool" )
161
- // / destructor is non-public in order to require the use of TheGameLogic->destroyObject()
162
- MEMORY_POOL_DELETEINSTANCE_VISIBILITY (protected)
163
161
164
162
public:
165
163
@@ -765,6 +763,9 @@ class Object : public Thing, public Snapshot
765
763
766
764
}; // end class Object
767
765
766
+ // deleteInstance is not meant to be used with Object in order to require the use of TheGameLogic->destroyObject()
767
+ void deleteInstance (Object* object) CPP_11(= delete );
768
+
768
769
// describe an object as an AsciiString: e.g. "Object 102 (KillerBuggy) [GLARocketBuggy, owned by player 2 (GLAIntroPlayer)]"
769
770
AsciiString DebugDescribeObject (const Object *obj);
770
771
Original file line number Diff line number Diff line change @@ -912,21 +912,6 @@ class MemoryPoolObjectHolder
912
912
};
913
913
914
914
915
- /* *
916
- Sometimes you want to make a class's destructor protected so that it can only
917
- be destroyed under special circumstances. MemoryPoolObject short-circuits this
918
- by making the destructor always be protected, and the true delete technique
919
- (namely, deleteInstance) always public by default. You can simulate the behavior
920
- you really want by including this macro
921
- */
922
- #define MEMORY_POOL_DELETEINSTANCE_VISIBILITY (ARGVIS )\
923
- ARGVIS: \
924
- static void deleteInstance (MemoryPoolObject* object) { \
925
- MemoryPoolObject::deleteInstance (object); \
926
- } \
927
- public:
928
-
929
-
930
915
#define EMPTY_DTOR (CLASS ) inline CLASS::~CLASS () { }
931
916
932
917
Original file line number Diff line number Diff line change @@ -164,8 +164,6 @@ class Object : public Thing, public Snapshot
164
164
{
165
165
166
166
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE (Object, " ObjectPool" )
167
- // / destructor is non-public in order to require the use of TheGameLogic->destroyObject()
168
- MEMORY_POOL_DELETEINSTANCE_VISIBILITY (protected)
169
167
170
168
public:
171
169
@@ -811,6 +809,9 @@ class Object : public Thing, public Snapshot
811
809
812
810
}; // end class Object
813
811
812
+ // deleteInstance is not meant to be used with Object in order to require the use of TheGameLogic->destroyObject()
813
+ void deleteInstance (Object* object) CPP_11(= delete );
814
+
814
815
// describe an object as an AsciiString: e.g. "Object 102 (KillerBuggy) [GLARocketBuggy, owned by player 2 (GLAIntroPlayer)]"
815
816
AsciiString DebugDescribeObject (const Object *obj);
816
817
You can’t perform that action at this time.
0 commit comments