Mark Factory variables as maybe_unused

This commit is contained in:
Michał Janiszewski 2017-04-15 15:21:41 +02:00 committed by Michał Janiszewski
parent 1d3076a2af
commit 5103113740
3 changed files with 13 additions and 2 deletions

View File

@ -216,7 +216,7 @@ public:
}
};
static auto Factory = GameActions::Register<PlaceParkEntranceAction>(GAME_COMMAND_PLACE_PARK_ENTRANCE);
static auto Factory UNUSED_ATTR = GameActions::Register<PlaceParkEntranceAction>(GAME_COMMAND_PLACE_PARK_ENTRANCE);
extern "C"
{

View File

@ -73,7 +73,7 @@ public:
}
};
static auto Factory = GameActions::Register<SetParkEntranceFeeAction>(GAME_COMMAND_SET_PARK_ENTRANCE_FEE);
static auto Factory UNUSED_ATTR = GameActions::Register<SetParkEntranceFeeAction>(GAME_COMMAND_SET_PARK_ENTRANCE_FEE);
extern "C"
{

View File

@ -247,6 +247,17 @@ typedef uint16 rct_string_id;
#define FASTCALL
#endif // PLATFORM_X86
// C++17 or later
#if defined(__cplusplus) && __cplusplus > 201402L
#define UNUSED_ATTR [[maybe_unused]]
#else
#ifdef __GNUC__
#define UNUSED_ATTR [[gnu::unused]]
#else
#define UNUSED_ATTR
#endif
#endif
/**
* x86 register structure, only used for easy interop to RCT2 code.
*/