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

Method Load

src/saveload/strings_sl.cpp:116–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114 NAMEChunkHandler() : ChunkHandler('NAME', CH_READONLY) {}
115
116 void Load() const override
117 {
118 int index;
119
120 while ((index = SlIterateArray()) != -1) {
121 if (index >= NUM_OLD_STRINGS) SlErrorCorrupt("Invalid old name index");
122 size_t length = SlGetFieldLength();
123 if (length > LEN_OLD_STRINGS) SlErrorCorrupt("Invalid old name length");
124
125 SlReadString(_old_name_array[index], length);
126 }
127 }
128};
129
130static const NAMEChunkHandler NAME;

Callers

nothing calls this directly

Calls 4

SlIterateArrayFunction · 0.85
SlErrorCorruptFunction · 0.85
SlGetFieldLengthFunction · 0.85
SlReadStringFunction · 0.85

Tested by

no test coverage detected