Use C++ noreturn attribute
This commit is contained in:
parent
49f0d833ab
commit
7a1119bac0
|
@ -127,7 +127,7 @@ char* programGetCurrentProcedureName(Program* program)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 0x4671F0
|
// 0x4671F0
|
||||||
__declspec(noreturn) void programFatalError(const char* format, ...)
|
[[noreturn]] void programFatalError(const char* format, ...)
|
||||||
{
|
{
|
||||||
char string[260];
|
char string[260];
|
||||||
|
|
||||||
|
|
|
@ -189,7 +189,7 @@ int _checkWait(Program* program);
|
||||||
void _interpretOutputFunc(int (*func)(char*));
|
void _interpretOutputFunc(int (*func)(char*));
|
||||||
int _interpretOutput(const char* format, ...);
|
int _interpretOutput(const char* format, ...);
|
||||||
char* programGetCurrentProcedureName(Program* s);
|
char* programGetCurrentProcedureName(Program* s);
|
||||||
__declspec(noreturn) void programFatalError(const char* str, ...);
|
[[noreturn]] void programFatalError(const char* str, ...);
|
||||||
opcode_t stackReadInt16(unsigned char* data, int pos);
|
opcode_t stackReadInt16(unsigned char* data, int pos);
|
||||||
int stackReadInt32(unsigned char* a1, int a2);
|
int stackReadInt32(unsigned char* a1, int a2);
|
||||||
void stackWriteInt16(int value, unsigned char* a2, int a3);
|
void stackWriteInt16(int value, unsigned char* a2, int a3);
|
||||||
|
|
|
@ -44,7 +44,7 @@ int memoryManagerPrintError(const char* format, ...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 0x484610
|
// 0x484610
|
||||||
__declspec(noreturn) void memoryManagerFatalAllocationError(const char* func, size_t size, const char* file, int line)
|
[[noreturn]] void memoryManagerFatalAllocationError(const char* func, size_t size, const char* file, int line)
|
||||||
{
|
{
|
||||||
memoryManagerPrintError("%s: Error allocating block of size %ld (%x), %s %d\n", func, size, size, file, line);
|
memoryManagerPrintError("%s: Error allocating block of size %ld (%x), %s %d\n", func, size, size, file, line);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
|
@ -15,7 +15,7 @@ extern char gMemoryManagerLastError[256];
|
||||||
|
|
||||||
void memoryManagerDefaultPrintErrorImpl(const char* string);
|
void memoryManagerDefaultPrintErrorImpl(const char* string);
|
||||||
int memoryManagerPrintError(const char* format, ...);
|
int memoryManagerPrintError(const char* format, ...);
|
||||||
__declspec(noreturn) void memoryManagerFatalAllocationError(const char* func, size_t size, const char* file, int line);
|
[[noreturn]] void memoryManagerFatalAllocationError(const char* func, size_t size, const char* file, int line);
|
||||||
void* memoryManagerDefaultMallocImpl(size_t size);
|
void* memoryManagerDefaultMallocImpl(size_t size);
|
||||||
void* memoryManagerDefaultReallocImpl(void* ptr, size_t size);
|
void* memoryManagerDefaultReallocImpl(void* ptr, size_t size);
|
||||||
void memoryManagerDefaultFreeImpl(void* ptr);
|
void memoryManagerDefaultFreeImpl(void* ptr);
|
||||||
|
|
Loading…
Reference in New Issue