TSAGE: Suppress strict-alias warnings on older GCCs
This commit is contained in:
parent
85adc95f79
commit
9363e19667
1 changed files with 7 additions and 1 deletions
|
@ -51,7 +51,13 @@ struct tSageSavegameHeader {
|
|||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
#define SYNC_POINTER(x) s.syncPointer((SavedObject **)&x)
|
||||
// FIXME: workaround to supress spurious strict-alias warnings on older GCC
|
||||
// versions. this should be resolved with the savegame rewrite
|
||||
#define SYNC_POINTER(x) do { \
|
||||
SavedObject *y = (SavedObject *)x; \
|
||||
s.syncPointer(&y); \
|
||||
} while (false)
|
||||
|
||||
#define SYNC_ENUM(FIELD, TYPE) int v_##FIELD = (int)FIELD; s.syncAsUint16LE(v_##FIELD); \
|
||||
if (s.isLoading()) FIELD = (TYPE)v_##FIELD;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue