MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / SlNullPointers

Function SlNullPointers

src/saveload/saveload.cpp:314–329  ·  view source on GitHub ↗

Null all pointers (convert index -> nullptr) */

Source from the content-addressed store, hash-verified

312
313/** Null all pointers (convert index -> nullptr) */
314static void SlNullPointers()
315{
316 _sl.action = SLA_NULL;
317
318 /* We don't want any savegame conversion code to run
319 * during NULLing; especially those that try to get
320 * pointers from other pools. */
321 _sl_version = SAVEGAME_VERSION;
322
323 for (const ChunkHandler &ch : ChunkHandlers()) {
324 Debug(sl, 3, "Nulling pointers for {}", ch.GetName());
325 ch.FixPointers();
326 }
327
328 assert(_sl.action == SLA_NULL);
329}
330
331/**
332 * Error handler. Sets everything up to show an error message and to clean

Callers 1

SlErrorFunction · 0.85

Calls 2

GetNameMethod · 0.45
FixPointersMethod · 0.45

Tested by

no test coverage detected