MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / nextUniqueNameTrap

Method nextUniqueNameTrap

source/gamemap/GameMap.cpp:2649–2658  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2647}
2648
2649std::string GameMap::nextUniqueNameTrap(TrapType type)
2650{
2651 std::string ret;
2652 do
2653 {
2654 ++mUniqueNumberTrap;
2655 ret = TrapManager::getTrapNameFromTrapType(type) + "_" + Helper::toString(mUniqueNumberTrap);
2656 } while(getTrapByName(ret) != nullptr);
2657 return ret;
2658}
2659
2660std::string GameMap::nextUniqueNameMapLight()
2661{

Callers 1

buildTrapDefaultMethod · 0.80

Calls 1

toStringFunction · 0.50

Tested by

no test coverage detected