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

Function SlRefList

src/saveload/saveload.cpp:1457–1467  ·  view source on GitHub ↗

* Save/Load a list. * @param list The list being manipulated. * @param conv VarType type of variable that is used for calculating the size. */

Source from the content-addressed store, hash-verified

1455 * @param conv VarType type of variable that is used for calculating the size.
1456 */
1457static void SlRefList(void *list, VarType conv)
1458{
1459 /* Automatically calculate the length? */
1460 if (_sl.need_length != NL_NONE) {
1461 SlSetLength(SlCalcRefListLen(list, conv));
1462 /* Determine length only? */
1463 if (_sl.need_length == NL_CALCLENGTH) return;
1464 }
1465
1466 SlStorageHelper<std::list, void *>::SlSaveLoad(list, conv, SL_REF);
1467}
1468
1469/**
1470 * Return the size in bytes of a vector.

Callers 1

SlObjectMemberFunction · 0.85

Calls 2

SlSetLengthFunction · 0.85
SlCalcRefListLenFunction · 0.85

Tested by

no test coverage detected