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

Method Save

src/saveload/saveload.h:1398–1406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1396 virtual size_t GetLength() const { return SlGetStructListLength(MAX_LENGTH); }
1397
1398 void Save(TObject *object) const override
1399 {
1400 auto &vector = this->GetVector(object);
1401 SlSetStructListLength(vector.size());
1402
1403 for (auto &item : vector) {
1404 SlObject(&item, this->GetDescription());
1405 }
1406 }
1407
1408 void Load(TObject *object) const override
1409 {

Callers

nothing calls this directly

Calls 4

SlSetStructListLengthFunction · 0.85
SlObjectFunction · 0.85
sizeMethod · 0.45
GetDescriptionMethod · 0.45

Tested by

no test coverage detected