mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-26 00:39:00 +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
|
||||
{
|
||||
void unreachable()
|
||||
__declspec(noreturn) void unreachable()
|
||||
{
|
||||
System::println(System::color::error, "Error: Unreachable code was reached");
|
||||
#ifndef NDEBUG
|
||||
@ -14,13 +14,13 @@ namespace vcpkg::Checks
|
||||
#endif
|
||||
}
|
||||
|
||||
void exit_with_message(const char* errorMessage)
|
||||
__declspec(noreturn) void exit_with_message(const char* errorMessage)
|
||||
{
|
||||
System::println(System::color::error, errorMessage);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
void throw_with_message(const char* errorMessage)
|
||||
__declspec(noreturn) void throw_with_message(const char* errorMessage)
|
||||
{
|
||||
throw std::runtime_error(errorMessage);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user