| 203 | //========================================================================== |
| 204 | |
| 205 | void 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 | // |
nothing calls this directly
no test coverage detected