mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 10:59:00 +08:00
[Checks] Add check_exit() overload with no message
This commit is contained in:
parent
37f45b9d5f
commit
af583825a7
@ -35,6 +35,8 @@ namespace vcpkg::Checks
|
||||
}
|
||||
}
|
||||
|
||||
void check_exit(bool expression);
|
||||
|
||||
void check_exit(bool expression, const char* errorMessage);
|
||||
|
||||
template <class...Args>
|
||||
|
@ -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)
|
||||
{
|
||||
if (!expression)
|
||||
|
Loading…
Reference in New Issue
Block a user