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

Method getId

src/Savegame/SavedGame.cpp:746–758  ·  view source on GitHub ↗

* Returns the latest ID for the specified object * and increases it. * @param name Object name. * @return Latest ID number. */

Source from the content-addressed store, hash-verified

744 * @return Latest ID number.
745 */
746int SavedGame::getId(const std::string &name)
747{
748 std::map<std::string, int>::iterator i = _ids.find(name);
749 if (i != _ids.end())
750 {
751 return i->second++;
752 }
753 else
754 {
755 _ids[name] = 1;
756 return _ids[name]++;
757 }
758}
759
760/**
761 * Returns the list of countries in the game world.

Callers 1

getSoldierMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected