mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-26 06:51:18 +08:00
Add __declspec(noreturn) in the definitions too
...to match the declarations
This commit is contained in:
parent
6c26a42d54
commit
2054f964fd
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
namespace vcpkg::Checks
|
namespace vcpkg::Checks
|
||||||
{
|
{
|
||||||
void unreachable()
|
__declspec(noreturn) void unreachable()
|
||||||
{
|
{
|
||||||
System::println(System::color::error, "Error: Unreachable code was reached");
|
System::println(System::color::error, "Error: Unreachable code was reached");
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
@ -14,13 +14,13 @@ namespace vcpkg::Checks
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void exit_with_message(const char* errorMessage)
|
__declspec(noreturn) void exit_with_message(const char* errorMessage)
|
||||||
{
|
{
|
||||||
System::println(System::color::error, errorMessage);
|
System::println(System::color::error, errorMessage);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void throw_with_message(const char* errorMessage)
|
__declspec(noreturn) void throw_with_message(const char* errorMessage)
|
||||||
{
|
{
|
||||||
throw std::runtime_error(errorMessage);
|
throw std::runtime_error(errorMessage);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user