MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / getSpaceUsed

Method getSpaceUsed

src/Savegame/Craft.cpp:839–847  ·  view source on GitHub ↗

* Returns the amount of space in use by * soldiers and vehicles. * @return Space used. */

Source from the content-addressed store, hash-verified

837 * @return Space used.
838 */
839int Craft::getSpaceUsed() const
840{
841 int vehicleSpaceUsed = 0;
842 for (std::vector<Vehicle*>::const_iterator i = _vehicles.begin(); i != _vehicles.end(); ++i)
843 {
844 vehicleSpaceUsed += (*i)->getSize();
845 }
846 return getNumSoldiers() + vehicleSpaceUsed;
847}
848
849/**
850 * Returns the total amount of vehicles of

Callers 4

initMethod · 0.80
lstSoldiersClickMethod · 0.80
CraftEquipmentStateMethod · 0.80
updateQuantityMethod · 0.80

Calls 1

getSizeMethod · 0.45

Tested by

no test coverage detected