mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-13 16:07:45 +00:00
- Be more compatible with C++11 narrowing conversions system.
This commit is contained in:
parent
8cab8f180b
commit
0dc70f847c
2 changed files with 17 additions and 17 deletions
|
@ -1755,21 +1755,21 @@ static int PatchCheats (int dummy)
|
||||||
static int PatchMisc (int dummy)
|
static int PatchMisc (int dummy)
|
||||||
{
|
{
|
||||||
static const struct Key keys[] = {
|
static const struct Key keys[] = {
|
||||||
{ "Initial Health", myoffsetof(struct DehInfo,StartHealth) },
|
{ "Initial Health", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,StartHealth)) },
|
||||||
{ "Initial Bullets", myoffsetof(struct DehInfo,StartBullets) },
|
{ "Initial Bullets", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,StartBullets)) },
|
||||||
{ "Max Health", myoffsetof(struct DehInfo,MaxHealth) },
|
{ "Max Health", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,MaxHealth)) },
|
||||||
{ "Max Armor", myoffsetof(struct DehInfo,MaxArmor) },
|
{ "Max Armor", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,MaxArmor)) },
|
||||||
{ "Green Armor Class", myoffsetof(struct DehInfo,GreenAC) },
|
{ "Green Armor Class", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,GreenAC)) },
|
||||||
{ "Blue Armor Class", myoffsetof(struct DehInfo,BlueAC) },
|
{ "Blue Armor Class", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,BlueAC)) },
|
||||||
{ "Max Soulsphere", myoffsetof(struct DehInfo,MaxSoulsphere) },
|
{ "Max Soulsphere", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,MaxSoulsphere)) },
|
||||||
{ "Soulsphere Health", myoffsetof(struct DehInfo,SoulsphereHealth) },
|
{ "Soulsphere Health", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,SoulsphereHealth)) },
|
||||||
{ "Megasphere Health", myoffsetof(struct DehInfo,MegasphereHealth) },
|
{ "Megasphere Health", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,MegasphereHealth)) },
|
||||||
{ "God Mode Health", myoffsetof(struct DehInfo,GodHealth) },
|
{ "God Mode Health", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,GodHealth)) },
|
||||||
{ "IDFA Armor", myoffsetof(struct DehInfo,FAArmor) },
|
{ "IDFA Armor", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,FAArmor)) },
|
||||||
{ "IDFA Armor Class", myoffsetof(struct DehInfo,FAAC) },
|
{ "IDFA Armor Class", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,FAAC)) },
|
||||||
{ "IDKFA Armor", myoffsetof(struct DehInfo,KFAArmor) },
|
{ "IDKFA Armor", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,KFAArmor)) },
|
||||||
{ "IDKFA Armor Class", myoffsetof(struct DehInfo,KFAAC) },
|
{ "IDKFA Armor Class", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,KFAAC)) },
|
||||||
{ "No Autofreeze", myoffsetof(struct DehInfo,NoAutofreeze) },
|
{ "No Autofreeze", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,NoAutofreeze)) },
|
||||||
{ NULL, 0 }
|
{ NULL, 0 }
|
||||||
};
|
};
|
||||||
int result;
|
int result;
|
||||||
|
|
|
@ -354,11 +354,11 @@ int MatchString (const char *in, const char **strings);
|
||||||
MSVC_MSEG FVariableInfo *infoptr_GlobalDef__##name GCC_MSEG = &GlobalDef__##name;
|
MSVC_MSEG FVariableInfo *infoptr_GlobalDef__##name GCC_MSEG = &GlobalDef__##name;
|
||||||
|
|
||||||
#define DEFINE_MEMBER_VARIABLE(name, cls) \
|
#define DEFINE_MEMBER_VARIABLE(name, cls) \
|
||||||
static FVariableInfo GlobalDef__##name = { #name, myoffsetof(cls, name), RUNTIME_CLASS(cls) }; \
|
static FVariableInfo GlobalDef__##name = { #name, static_cast<intptr_t>(myoffsetof(cls, name)), RUNTIME_CLASS(cls) }; \
|
||||||
MSVC_MSEG FVariableInfo *infoptr_GlobalDef__##name GCC_MSEG = &GlobalDef__##name;
|
MSVC_MSEG FVariableInfo *infoptr_GlobalDef__##name GCC_MSEG = &GlobalDef__##name;
|
||||||
|
|
||||||
#define DEFINE_MEMBER_VARIABLE_ALIAS(name, alias, cls) \
|
#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<intptr_t>(myoffsetof(cls, alias)), RUNTIME_CLASS(cls) }; \
|
||||||
MSVC_MSEG FVariableInfo *infoptr_GlobalDef__##name GCC_MSEG = &GlobalDef__##name;
|
MSVC_MSEG FVariableInfo *infoptr_GlobalDef__##name GCC_MSEG = &GlobalDef__##name;
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue