mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 21:11:39 +00:00
- removed some redundant static_casts.
This commit is contained in:
parent
9c9b2ccf6d
commit
80801d11b1
5 changed files with 9 additions and 10 deletions
|
@ -514,7 +514,7 @@ FState *AWeapon::GetStateForButtonName (FName button)
|
|||
|
||||
bool FWeaponSlot::AddWeapon(const char *type)
|
||||
{
|
||||
return AddWeapon(static_cast<PClassActor *>(PClass::FindClass(type)));
|
||||
return AddWeapon(PClass::FindActor(type));
|
||||
}
|
||||
|
||||
bool FWeaponSlot::AddWeapon(PClassActor *type)
|
||||
|
@ -1443,7 +1443,7 @@ void P_SetupWeapons_ntohton()
|
|||
|
||||
if (cls->IsDescendantOf(NAME_Weapon))
|
||||
{
|
||||
Weapons_ntoh.Push(static_cast<PClassActor *>(cls));
|
||||
Weapons_ntoh.Push(cls);
|
||||
}
|
||||
}
|
||||
qsort(&Weapons_ntoh[1], Weapons_ntoh.Size() - 1, sizeof(Weapons_ntoh[0]), ntoh_cmp);
|
||||
|
|
|
@ -385,21 +385,20 @@ static void SetKeyTypes()
|
|||
{
|
||||
for(unsigned int i = 0; i < PClassActor::AllActorClasses.Size(); i++)
|
||||
{
|
||||
PClass *ti = PClassActor::AllActorClasses[i];
|
||||
PClassActor *ti = PClassActor::AllActorClasses[i];
|
||||
auto kt = PClass::FindActor(NAME_Key);
|
||||
|
||||
if (ti->IsDescendantOf(kt))
|
||||
{
|
||||
PClassActor *tia = static_cast<PClassActor *>(ti);
|
||||
AInventory *key = (AInventory*)(GetDefaultByType(tia));
|
||||
AInventory *key = (AInventory*)(GetDefaultByType(ti));
|
||||
|
||||
if (key->Icon.isValid() && key->special1 > 0)
|
||||
{
|
||||
KeyTypes.Push(tia);
|
||||
KeyTypes.Push(ti);
|
||||
}
|
||||
else
|
||||
{
|
||||
UnassignedKeyTypes.Push(tia);
|
||||
UnassignedKeyTypes.Push(ti);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -282,7 +282,7 @@ void PClassActor::StaticSetActorNums()
|
|||
{
|
||||
for (unsigned int i = 0; i < PClassActor::AllActorClasses.Size(); ++i)
|
||||
{
|
||||
static_cast<PClassActor *>(PClassActor::AllActorClasses[i])->RegisterIDs();
|
||||
PClassActor::AllActorClasses[i]->RegisterIDs();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1116,7 +1116,7 @@ static PClassActor *ParseActorHeader(FScanner &sc, Baggage *bag)
|
|||
sc.ScriptMessage("Replaced type '%s' not found for %s", replaceName.GetChars(), info->TypeName.GetChars());
|
||||
}
|
||||
|
||||
ResetBaggage (bag, info == RUNTIME_CLASS(AActor) ? NULL : static_cast<PClassActor *>(info->ParentClass));
|
||||
ResetBaggage (bag, ValidateActor(info->ParentClass));
|
||||
bag->Info = info;
|
||||
bag->Lumpnum = sc.LumpNum;
|
||||
#ifdef _DEBUG
|
||||
|
|
|
@ -1071,7 +1071,7 @@ DEFINE_PROPERTY(distancecheck, S, Actor)
|
|||
}
|
||||
else if (cv->GetRealType() == CVAR_Int)
|
||||
{
|
||||
static_cast<PClassActor*>(info)->ActorInfo()->distancecheck = static_cast<FIntCVar *>(cv);
|
||||
info->ActorInfo()->distancecheck = static_cast<FIntCVar *>(cv);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue