mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-07 15:31:11 +00:00
- mark all return values from the texture() getters as const.
This is necessary to evade C++ stupidity which happily allows assignment to non-const struct type return values and won't even warn about it. As const these will throw an error when that happens.
This commit is contained in:
parent
ffa265ae1d
commit
4ecb4aacb2
2 changed files with 6 additions and 6 deletions
|
@ -294,8 +294,8 @@ struct walltype
|
||||||
bool hasX() const { return _xw != nullptr; }
|
bool hasX() const { return _xw != nullptr; }
|
||||||
void allocX();
|
void allocX();
|
||||||
|
|
||||||
FTextureID walltexture() const;
|
const FTextureID walltexture() const;
|
||||||
FTextureID overtexture() const;
|
const FTextureID overtexture() const;
|
||||||
void setwalltexture(FTextureID tex);
|
void setwalltexture(FTextureID tex);
|
||||||
void setovertexture(FTextureID tex);
|
void setovertexture(FTextureID tex);
|
||||||
};
|
};
|
||||||
|
@ -501,7 +501,7 @@ struct spritetypebase
|
||||||
pos = { x * maptoworld, y * maptoworld, z * zmaptoworld };
|
pos = { x * maptoworld, y * maptoworld, z * zmaptoworld };
|
||||||
}
|
}
|
||||||
|
|
||||||
FTextureID spritetexture() const;
|
const FTextureID spritetexture() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -693,11 +693,11 @@ PicAnm picanm;
|
||||||
|
|
||||||
|
|
||||||
// wrappers that allow partial migration to a textureID-based setup.
|
// wrappers that allow partial migration to a textureID-based setup.
|
||||||
FTextureID walltype::walltexture() const
|
const FTextureID walltype::walltexture() const
|
||||||
{
|
{
|
||||||
return tileGetTextureID(wallpicnum);
|
return tileGetTextureID(wallpicnum);
|
||||||
}
|
}
|
||||||
FTextureID walltype::overtexture() const
|
const FTextureID walltype::overtexture() const
|
||||||
{
|
{
|
||||||
return tileGetTextureID(overpicnum);
|
return tileGetTextureID(overpicnum);
|
||||||
}
|
}
|
||||||
|
@ -712,7 +712,7 @@ const FTextureID sectortype::floortexture() const
|
||||||
return tileGetTextureID(floorpicnum);
|
return tileGetTextureID(floorpicnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
FTextureID spritetypebase::spritetexture() const
|
const FTextureID spritetypebase::spritetexture() const
|
||||||
{
|
{
|
||||||
return tileGetTextureID(picnum);
|
return tileGetTextureID(picnum);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue