Fixed potential reaching end of function.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-06-05 15:42:28 +02:00
parent 66379bfa65
commit 3c5b3d5c03
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
2 changed files with 6 additions and 0 deletions

View File

@ -105,6 +105,8 @@ namespace CreatureLib::Battling {
return {battle->GetCreature(index)}; return {battle->GetCreature(index)};
}; };
} }
THROW_CREATURE("Unknown attack target kind: '" << CreatureLib::Library::AttackTargetHelper::ToString(target)
<< "'.");
} }
}; };
} }

View File

@ -10,4 +10,8 @@ public:
virtual ~CreatureException() = default; virtual ~CreatureException() = default;
}; };
#define THROW_CREATURE(message) \
std::stringstream ss; \
ss << message; \
throw CreatureException(ss.str());
#endif // CREATURELIB_CREATUREEXCEPTION_HPP #endif // CREATURELIB_CREATUREEXCEPTION_HPP