MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / ReadIntVec

Method ReadIntVec

Source/Game/EntityDescription.cpp:1355–1363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1353}
1354
1355void EntityDescriptionField::ReadIntVec(std::vector<int>* vec) const {
1356 int index = 0;
1357 int size;
1358 memread(&size, sizeof(int), 1, data, index);
1359 vec->resize(size);
1360 if (size) {
1361 memread(&vec->at(0), sizeof(int), size, data, index);
1362 }
1363}
1364
1365void EntityDescriptionField::WriteIntVec(const std::vector<int>& val) {
1366 int val_size = (int)val.size();

Callers 8

LocalizeIDsFunction · 0.80
SetFromDescMethod · 0.80
SetFromDescMethod · 0.80
SetFromDescMethod · 0.80
SetFromDescMethod · 0.80
SetFromDescMethod · 0.80
SaveToXMLMethod · 0.80

Calls 3

memreadFunction · 0.85
resizeMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected