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

Function SlRefVector

src/saveload/saveload.cpp:1484–1494  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1482 * @param conv VarType type of variable that is used for calculating the size.
1483 */
1484static void SlRefVector(void *vector, VarType conv)
1485{
1486 /* Automatically calculate the length? */
1487 if (_sl.need_length != NL_NONE) {
1488 SlSetLength(SlCalcRefVectorLen(vector, conv));
1489 /* Determine length only? */
1490 if (_sl.need_length == NL_CALCLENGTH) return;
1491 }
1492
1493 SlStorageHelper<std::vector, void *>::SlSaveLoad(vector, conv, SL_REF);
1494}
1495
1496/**
1497 * Return the size in bytes of a std::deque.

Callers 1

SlObjectMemberFunction · 0.85

Calls 2

SlSetLengthFunction · 0.85
SlCalcRefVectorLenFunction · 0.85

Tested by

no test coverage detected