| 414 | } |
| 415 | |
| 416 | const Weapon* GameMap::getWeapon(int index) |
| 417 | { |
| 418 | if(index >= static_cast<int>(mWeapons.size())) |
| 419 | { |
| 420 | OD_LOG_ERR("index=" + Helper::toString(index)); |
| 421 | return nullptr; |
| 422 | } |
| 423 | |
| 424 | std::pair<const Weapon*,Weapon*>& def = mWeapons[index]; |
| 425 | if(def.second != nullptr) |
| 426 | return def.second; |
| 427 | |
| 428 | return def.first; |
| 429 | } |
| 430 | |
| 431 | const Weapon* GameMap::getWeapon(const std::string& name) |
| 432 | { |
no test coverage detected