- fixed some warnings.

This commit is contained in:
Christoph Oelckers 2023-06-16 20:50:04 +02:00
parent 3ddf72104b
commit 40679294df
4 changed files with 4 additions and 4 deletions

View file

@ -367,7 +367,7 @@ static bool IndexOutOfRange(const int start1, const int end1, const int start2,
//
//----------------------------------------------------------------------------
bool FRemapTable::operator==(const FRemapTable& o)
bool FRemapTable::operator==(const FRemapTable& o) const
{
// Two translations are identical when they have the same amount of colors
// and the palette values for both are identical.

View file

@ -19,7 +19,7 @@ struct FRemapTable
FRemapTable(const FRemapTable& o) = default;
FRemapTable& operator=(const FRemapTable& o) = default;
bool operator==(const FRemapTable& o);
bool operator==(const FRemapTable& o) const;
void MakeIdentity();
bool IsIdentity() const;
bool AddIndexRange(int start, int end, int pal1, int pal2);

View file

@ -561,7 +561,7 @@ struct TVector3
void GetRightUp(TVector3 &right, TVector3 &up)
{
TVector3 n(X, Y, Z);
TVector3 fn(fabs(n.X), fabs(n.Y), fabs(n.Z));
TVector3 fn((vec_t)fabs(n.X), (vec_t)fabs(n.Y), (vec_t)fabs(n.Z));
int major = 0;
if (fn[1] > fn[major]) major = 1;

View file

@ -425,7 +425,7 @@ CCMD (changeskill)
if (argv.argc() == 2)
{
int skill = atoi(argv[1]);
if (skill < 0 || skill >= AllSkills.Size())
if ((unsigned)skill >= AllSkills.Size())
{
Printf ("Skill %d is out of range.\n", skill);
}