Add __declspec(noreturn) in the definitions too

...to match the declarations
This commit is contained in:
Alexander Karatarakis 2017-03-02 18:52:15 -08:00
parent 6c26a42d54
commit 2054f964fd

View File

@ -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);
} }