[Checks] Add check_exit() overload with no message

This commit is contained in:
Alexander Karatarakis 2017-02-10 16:51:36 -08:00
parent 37f45b9d5f
commit af583825a7
2 changed files with 10 additions and 0 deletions

View File

@ -35,6 +35,8 @@ namespace vcpkg::Checks
} }
} }
void check_exit(bool expression);
void check_exit(bool expression, const char* errorMessage); void check_exit(bool expression, const char* errorMessage);
template <class...Args> template <class...Args>

View File

@ -33,6 +33,14 @@ namespace vcpkg::Checks
} }
} }
void check_exit(bool expression)
{
if (!expression)
{
exit(EXIT_FAILURE);
}
}
void check_exit(bool expression, const char* errorMessage) void check_exit(bool expression, const char* errorMessage)
{ {
if (!expression) if (!expression)