mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
vcmi: use std::optional
This commit is contained in:
@@ -408,7 +408,7 @@ CCreatureHandler::CCreatureHandler()
|
||||
|
||||
const CCreature * CCreatureHandler::getCreature(const std::string & scope, const std::string & identifier) const
|
||||
{
|
||||
boost::optional<si32> index = VLC->modh->identifiers.getIdentifier(scope, "creature", identifier);
|
||||
std::optional<si32> index = VLC->modh->identifiers.getIdentifier(scope, "creature", identifier);
|
||||
|
||||
if(!index)
|
||||
throw std::runtime_error("Creature not found "+identifier);
|
||||
|
||||
Reference in New Issue
Block a user