MCPcopy Create free account
hub / github.com/ZDoom/Raze / StaticInit

Method StaticInit

source/common/objects/dobjtype.cpp:205–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203//==========================================================================
204
205void PClass::StaticInit ()
206{
207 Namespaces.GlobalNamespace = Namespaces.NewNamespace(0);
208
209 AutoSegs::TypeInfos.ForEach([](ClassReg* typeInfo)
210 {
211 typeInfo->RegisterClass();
212 });
213
214 // Keep built-in classes in consistant order. I did this before, though
215 // I'm not sure if this is really necessary to maintain any sort of sync.
216 qsort(&AllClasses[0], AllClasses.Size(), sizeof(AllClasses[0]), cregcmp);
217
218 // WP_NOCHANGE must point to a valid object, although it does not need to be a weapon.
219 // A simple DObject is enough to give the GC the ability to deal with it, if subjected to it.
220 WP_NOCHANGE = Create<DObject>();
221 WP_NOCHANGE->Release();
222}
223
224//==========================================================================
225//

Callers

nothing calls this directly

Calls 4

NewNamespaceMethod · 0.80
RegisterClassMethod · 0.80
SizeMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected