Check for proper number of failure reasons.

This commit is contained in:
Bartosz Taudul 2019-01-15 18:56:17 +01:00
parent 76ab70a948
commit ecf9a299de

View File

@ -3648,6 +3648,8 @@ static const char* s_failureReasons[] = {
"Invalid order of zone begin and end events." "Invalid order of zone begin and end events."
}; };
static_assert( sizeof( s_failureReasons ) / sizeof( *s_failureReasons ) == (int)Worker::Failure::NUM_FAILURES, "Missing failure reason description." );
const char* Worker::GetFailureString( Worker::Failure failure ) const char* Worker::GetFailureString( Worker::Failure failure )
{ {
return s_failureReasons[(int)failure]; return s_failureReasons[(int)failure];