diff --git a/src/d_dehacked.cpp b/src/d_dehacked.cpp index d01e9513f..e6376a589 100644 --- a/src/d_dehacked.cpp +++ b/src/d_dehacked.cpp @@ -1755,21 +1755,21 @@ static int PatchCheats (int dummy) static int PatchMisc (int dummy) { static const struct Key keys[] = { - { "Initial Health", myoffsetof(struct DehInfo,StartHealth) }, - { "Initial Bullets", myoffsetof(struct DehInfo,StartBullets) }, - { "Max Health", myoffsetof(struct DehInfo,MaxHealth) }, - { "Max Armor", myoffsetof(struct DehInfo,MaxArmor) }, - { "Green Armor Class", myoffsetof(struct DehInfo,GreenAC) }, - { "Blue Armor Class", myoffsetof(struct DehInfo,BlueAC) }, - { "Max Soulsphere", myoffsetof(struct DehInfo,MaxSoulsphere) }, - { "Soulsphere Health", myoffsetof(struct DehInfo,SoulsphereHealth) }, - { "Megasphere Health", myoffsetof(struct DehInfo,MegasphereHealth) }, - { "God Mode Health", myoffsetof(struct DehInfo,GodHealth) }, - { "IDFA Armor", myoffsetof(struct DehInfo,FAArmor) }, - { "IDFA Armor Class", myoffsetof(struct DehInfo,FAAC) }, - { "IDKFA Armor", myoffsetof(struct DehInfo,KFAArmor) }, - { "IDKFA Armor Class", myoffsetof(struct DehInfo,KFAAC) }, - { "No Autofreeze", myoffsetof(struct DehInfo,NoAutofreeze) }, + { "Initial Health", static_cast(myoffsetof(struct DehInfo,StartHealth)) }, + { "Initial Bullets", static_cast(myoffsetof(struct DehInfo,StartBullets)) }, + { "Max Health", static_cast(myoffsetof(struct DehInfo,MaxHealth)) }, + { "Max Armor", static_cast(myoffsetof(struct DehInfo,MaxArmor)) }, + { "Green Armor Class", static_cast(myoffsetof(struct DehInfo,GreenAC)) }, + { "Blue Armor Class", static_cast(myoffsetof(struct DehInfo,BlueAC)) }, + { "Max Soulsphere", static_cast(myoffsetof(struct DehInfo,MaxSoulsphere)) }, + { "Soulsphere Health", static_cast(myoffsetof(struct DehInfo,SoulsphereHealth)) }, + { "Megasphere Health", static_cast(myoffsetof(struct DehInfo,MegasphereHealth)) }, + { "God Mode Health", static_cast(myoffsetof(struct DehInfo,GodHealth)) }, + { "IDFA Armor", static_cast(myoffsetof(struct DehInfo,FAArmor)) }, + { "IDFA Armor Class", static_cast(myoffsetof(struct DehInfo,FAAC)) }, + { "IDKFA Armor", static_cast(myoffsetof(struct DehInfo,KFAArmor)) }, + { "IDKFA Armor Class", static_cast(myoffsetof(struct DehInfo,KFAAC)) }, + { "No Autofreeze", static_cast(myoffsetof(struct DehInfo,NoAutofreeze)) }, { NULL, 0 } }; int result; diff --git a/src/thingdef/thingdef.h b/src/thingdef/thingdef.h index 08264e0a8..63d04ea29 100644 --- a/src/thingdef/thingdef.h +++ b/src/thingdef/thingdef.h @@ -354,11 +354,11 @@ int MatchString (const char *in, const char **strings); MSVC_MSEG FVariableInfo *infoptr_GlobalDef__##name GCC_MSEG = &GlobalDef__##name; #define DEFINE_MEMBER_VARIABLE(name, cls) \ - static FVariableInfo GlobalDef__##name = { #name, myoffsetof(cls, name), RUNTIME_CLASS(cls) }; \ + static FVariableInfo GlobalDef__##name = { #name, static_cast(myoffsetof(cls, name)), RUNTIME_CLASS(cls) }; \ MSVC_MSEG FVariableInfo *infoptr_GlobalDef__##name GCC_MSEG = &GlobalDef__##name; #define DEFINE_MEMBER_VARIABLE_ALIAS(name, alias, cls) \ - static FVariableInfo GlobalDef__##name = { #name, myoffsetof(cls, alias), RUNTIME_CLASS(cls) }; \ + static FVariableInfo GlobalDef__##name = { #name, static_cast(myoffsetof(cls, alias)), RUNTIME_CLASS(cls) }; \ MSVC_MSEG FVariableInfo *infoptr_GlobalDef__##name GCC_MSEG = &GlobalDef__##name;