- Clean up some GCC const warnings.

This commit is contained in:
Mitchell Richters 2023-11-05 20:54:17 +11:00
parent 85bbf80dba
commit 9e1ce2b970
5 changed files with 14 additions and 14 deletions

View file

@ -39,10 +39,10 @@ public:
// All overridable methods.
virtual DCoreActor* GetActor() = 0;
virtual const bool canSlopeTilt() const { return false; }
virtual const unsigned getCrouchFlags() const = 0;
virtual bool canSlopeTilt() const { return false; }
virtual unsigned getCrouchFlags() const = 0;
virtual double GetMaxInputVel() const = 0;
virtual const DVector2& GetInputVelocity() const { return actor->vel.XY(); }
virtual const double GetMaxInputVel() const = 0;
// Angle prototypes.
void doPitchInput();

View file

@ -300,19 +300,19 @@ public:
return static_cast<DBloodActor*>(actor);
}
const double GetMaxInputVel() const override
double GetMaxInputVel() const override
{
return (36211. / 3000.);
}
const bool canSlopeTilt() const override
bool canSlopeTilt() const override
{
const auto pActor = static_cast<DBloodActor*>(actor);
const int florhit = pActor->hit.florhit.type;
return pActor->xspr.height < 16 && (florhit == kHitSector || florhit == 0);
}
const unsigned getCrouchFlags() const override
unsigned getCrouchFlags() const override
{
const bool swimming = posture == kPostureSwim;
return (CS_CANCROUCH * !swimming) | (CS_DISABLETOGGLE * swimming);

View file

@ -361,7 +361,7 @@ public:
void checkhardlanding();
void playerweaponsway(double xvel);
const double GetMaxInputVel() const override
double GetMaxInputVel() const override
{
return (117351124. / 10884538.);
}
@ -405,7 +405,7 @@ public:
}
}
const bool canSlopeTilt() const override
bool canSlopeTilt() const override
{
return aim_mode == 0 && on_ground && cursector->lotag != ST_2_UNDERWATER;
}
@ -420,7 +420,7 @@ public:
cmd.ucmd.setItemUsed(num - 1);
}
const unsigned getCrouchFlags() const override
unsigned getCrouchFlags() const override
{
const int sectorLotag = insector() ? cursector->lotag : 0;
const int crouchable = sectorLotag != ST_2_UNDERWATER && (sectorLotag != ST_1_ABOVE_WATER || spritebridge) && !jetpack_on;

View file

@ -119,12 +119,12 @@ public:
return static_cast<DExhumedActor*>(actor);
}
const double GetMaxInputVel() const override
double GetMaxInputVel() const override
{
return 15.25;
}
const unsigned getCrouchFlags() const override
unsigned getCrouchFlags() const override
{
return (CS_CANCROUCH * !bUnderwater) | (CS_DISABLETOGGLE * bUnderwater);
}

View file

@ -1851,7 +1851,7 @@ public:
uint8_t WpnReloadState;
const double GetMaxInputVel() const override
double GetMaxInputVel() const override
{
return (380401538. / 36022361.);
}
@ -1861,7 +1861,7 @@ public:
return vect;
}
const bool canSlopeTilt() const override
bool canSlopeTilt() const override
{
return (cmd.ucmd.actions & SB_AIMMODE) && !(Flags & (PF_FLYING|PF_SWIMMING|PF_DIVING|PF_CLIMBING|PF_JUMPING|PF_FALLING));
}
@ -1876,7 +1876,7 @@ public:
GetActor()->spr.pos.Z = val - GetActor()->viewzoffset;
}
const unsigned getCrouchFlags() const override
unsigned getCrouchFlags() const override
{
const bool crouchable = true;
const bool disableToggle = (Flags & (PF_JUMPING|PF_FALLING|PF_CLIMBING|PF_DIVING|PF_DEAD)) || sop;