- Be more compatible with C++11 narrowing conversions system.

This commit is contained in:
Edoardo Prezioso 2013-07-31 12:26:47 +02:00
parent 8cab8f180b
commit 0dc70f847c
2 changed files with 17 additions and 17 deletions

View File

@ -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<ptrdiff_t>(myoffsetof(struct DehInfo,StartHealth)) },
{ "Initial Bullets", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,StartBullets)) },
{ "Max Health", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,MaxHealth)) },
{ "Max Armor", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,MaxArmor)) },
{ "Green Armor Class", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,GreenAC)) },
{ "Blue Armor Class", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,BlueAC)) },
{ "Max Soulsphere", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,MaxSoulsphere)) },
{ "Soulsphere Health", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,SoulsphereHealth)) },
{ "Megasphere Health", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,MegasphereHealth)) },
{ "God Mode Health", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,GodHealth)) },
{ "IDFA Armor", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,FAArmor)) },
{ "IDFA Armor Class", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,FAAC)) },
{ "IDKFA Armor", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,KFAArmor)) },
{ "IDKFA Armor Class", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,KFAAC)) },
{ "No Autofreeze", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,NoAutofreeze)) },
{ NULL, 0 }
};
int result;

View File

@ -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<intptr_t>(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<intptr_t>(myoffsetof(cls, alias)), RUNTIME_CLASS(cls) }; \
MSVC_MSEG FVariableInfo *infoptr_GlobalDef__##name GCC_MSEG = &GlobalDef__##name;