mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-08-22 07:04:47 -04:00
Attempt At Fixing Clang (#647)
* Update Game.h * Update Game.h * Update macros.h
This commit is contained in:
@@ -4,6 +4,20 @@
|
||||
#include <math.h>
|
||||
#include <libultraship.h>
|
||||
|
||||
// no return attribute
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
|
||||
#include <stdnoreturn.h>
|
||||
#define NORETURN noreturn
|
||||
#elif defined(__cplusplus) && __cplusplus >= 201103L
|
||||
#define NORETURN [[noreturn]]
|
||||
#elif defined(_MSC_VER)
|
||||
#define NORETURN __declspec(noreturn)
|
||||
#elif defined(__GNUC__) || defined(__clang__)
|
||||
#define NORETURN __attribute__((noreturn))
|
||||
#else
|
||||
#define NORETURN
|
||||
#endif
|
||||
|
||||
#ifndef __sgi
|
||||
#define GLOBAL_ASM(...)
|
||||
#endif
|
||||
|
||||
+2
-11
@@ -4,6 +4,7 @@
|
||||
#include <libultraship.h>
|
||||
#include "engine/tracks/Track.h"
|
||||
#include "engine/HM_Intro.h"
|
||||
#include "macros.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include "engine/editor/Editor.h"
|
||||
@@ -235,17 +236,7 @@ void CM_ResetAudio(void);
|
||||
__attribute__((format(printf, 1, 2)))
|
||||
#endif
|
||||
|
||||
// Add noreturn attribute
|
||||
#if defined(_MSC_VER)
|
||||
__declspec(noreturn)
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__OpenBSD__)
|
||||
#elif defined(__cplusplus) || (__STDC_VERSION__ >= 202311)
|
||||
[[noreturn]]
|
||||
#elif defined(__GNUC__)
|
||||
__attribute__((noreturn))
|
||||
#endif
|
||||
void CM_ThrowRuntimeError(const char* fmt, ...);
|
||||
NORETURN void CM_ThrowRuntimeError(const char* fmt, ...);
|
||||
|
||||
// NOLINTEND(readability-identifier-naming)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user