replace UNUSED with standard stuff
parent
baceb44b26
commit
93591c1b6b
|
@ -211,7 +211,7 @@ static bool initidents()
|
|||
}
|
||||
return true;
|
||||
}
|
||||
UNUSED static bool forceinitidents = initidents();
|
||||
[[maybe_unused]] static bool forceinitidents = initidents();
|
||||
|
||||
static const char *sourcefile = nullptr, *sourcestr = nullptr;
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ static model *__loadmodel__##modelclass(const char *filename) \
|
|||
{ \
|
||||
return new modelclass(filename); \
|
||||
} \
|
||||
UNUSED static int __dummy__##modelclass = addmodeltype((modeltype), __loadmodel__##modelclass);
|
||||
[[maybe_unused]] static int __dummy__##modelclass = addmodeltype((modeltype), __loadmodel__##modelclass);
|
||||
|
||||
static void loadskin(const char *dir, const char *altdir, Texture *&skin, Texture *&masks);
|
||||
|
||||
|
|
|
@ -20,12 +20,6 @@
|
|||
#define RESTRICT
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define UNUSED __attribute__((unused))
|
||||
#else
|
||||
#define UNUSED
|
||||
#endif
|
||||
|
||||
#ifdef swap
|
||||
#undef swap
|
||||
#endif
|
||||
|
|
|
@ -315,8 +315,8 @@ inline void ident::getcval(tagval &v) const
|
|||
}
|
||||
|
||||
// nasty macros for registering script functions, abuses globals to avoid excessive infrastructure
|
||||
#define KEYWORD(name, type) UNUSED static bool __dummy_##type = addcommand(#name, (identfun)nullptr, nullptr, type)
|
||||
#define COMMANDKN(name, type, fun, nargs) UNUSED static bool __dummy_##fun = addcommand(#name, (identfun)fun, nargs, type)
|
||||
#define KEYWORD(name, type) [[maybe_unused]] static bool __dummy_##type = addcommand(#name, (identfun)nullptr, nullptr, type)
|
||||
#define COMMANDKN(name, type, fun, nargs) [[maybe_unused]] static bool __dummy_##fun = addcommand(#name, (identfun)fun, nargs, type)
|
||||
#define COMMANDK(name, type, nargs) COMMANDKN(name, type, name, nargs)
|
||||
#define COMMANDN(name, fun, nargs) COMMANDKN(name, ID_COMMAND, fun, nargs)
|
||||
#define COMMAND(name, nargs) COMMANDN(name, name, nargs)
|
||||
|
|
Loading…
Reference in New Issue