MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / ~MovingTarget

Method ~MovingTarget

src/Savegame/MovingTarget.cpp:37–50  ·  view source on GitHub ↗

* Make sure to cleanup the target's destination followers. */

Source from the content-addressed store, hash-verified

35 * Make sure to cleanup the target's destination followers.
36 */
37MovingTarget::~MovingTarget()
38{
39 if (_dest != 0 && !_dest->getFollowers()->empty())
40 {
41 for (std::vector<Target*>::iterator i = _dest->getFollowers()->begin(); i != _dest->getFollowers()->end(); ++i)
42 {
43 if ((*i) == this)
44 {
45 _dest->getFollowers()->erase(i);
46 break;
47 }
48 }
49 }
50}
51
52/**
53 * Loads the moving target from a YAML file.

Callers

nothing calls this directly

Calls 2

getFollowersMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected