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

Method getMapBlock

src/Ruleset/RuleTerrain.cpp:155–163  ·  view source on GitHub ↗

* Gets a mapblock with a given name. * @param name The name of the mapblock. * @return Pointer to mapblock. */

Source from the content-addressed store, hash-verified

153 * @return Pointer to mapblock.
154 */
155MapBlock* RuleTerrain::getMapBlock(const std::string &name)
156{
157 for (std::vector<MapBlock*>::const_iterator i = _mapBlocks.begin(); i != _mapBlocks.end(); ++i)
158 {
159 if((*i)->getName() == name)
160 return (*i);
161 }
162 return 0;
163}
164
165/**
166 * Gets a mapdata object.

Callers 1

generateMapMethod · 0.80

Calls 1

getNameMethod · 0.45

Tested by

no test coverage detected