Codechange: Replace old non-standard attributes with C++17/20 standard attributes.

This commit is contained in:
frosch
2024-01-31 21:03:17 +01:00
committed by frosch
parent 8a4f0c4b02
commit b1718478c8
79 changed files with 169 additions and 206 deletions

View File

@@ -17,7 +17,7 @@
* Function to exit with an error message after malloc() or calloc() have failed
* @param size number of bytes we tried to allocate
*/
void NORETURN MallocError(size_t size)
[[noreturn]] void MallocError(size_t size)
{
FatalError("Out of memory. Cannot allocate {} bytes", size);
}
@@ -26,7 +26,7 @@ void NORETURN MallocError(size_t size)
* Function to exit with an error message after realloc() have failed
* @param size number of bytes we tried to allocate
*/
void NORETURN ReallocError(size_t size)
[[noreturn]] void ReallocError(size_t size)
{
FatalError("Out of memory. Cannot reallocate {} bytes", size);
}