mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 12:58:00 +03:00
Sprinkle some [[noreturn]] where possible
This commit is contained in:
parent
00c41e55a4
commit
aec3c74fa5
13 changed files with 18 additions and 20 deletions
|
@ -81,13 +81,13 @@ namespace Interpreter
|
|||
abortUnknownSegment (code);
|
||||
}
|
||||
|
||||
void Interpreter::abortUnknownCode (int segment, int opcode)
|
||||
[[noreturn]] void Interpreter::abortUnknownCode (int segment, int opcode)
|
||||
{
|
||||
const std::string error = "unknown opcode " + std::to_string(opcode) + " in segment " + std::to_string(segment);
|
||||
throw std::runtime_error (error);
|
||||
}
|
||||
|
||||
void Interpreter::abortUnknownSegment (Type_Code code)
|
||||
[[noreturn]] void Interpreter::abortUnknownSegment (Type_Code code)
|
||||
{
|
||||
const std::string error = "opcode outside of the allocated segment range: " + std::to_string(code);
|
||||
throw std::runtime_error (error);
|
||||
|
|
|
@ -28,9 +28,9 @@ namespace Interpreter
|
|||
|
||||
void execute (Type_Code code);
|
||||
|
||||
void abortUnknownCode (int segment, int opcode);
|
||||
[[noreturn]] void abortUnknownCode (int segment, int opcode);
|
||||
|
||||
void abortUnknownSegment (Type_Code code);
|
||||
[[noreturn]] void abortUnknownSegment (Type_Code code);
|
||||
|
||||
void begin();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue