mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 12:30:40 +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; }
|
||||
void allocX();
|
||||
|
||||
FTextureID walltexture() const;
|
||||
FTextureID overtexture() const;
|
||||
const FTextureID walltexture() const;
|
||||
const FTextureID overtexture() const;
|
||||
void setwalltexture(FTextureID tex);
|
||||
void setovertexture(FTextureID tex);
|
||||
};
|
||||
|
@ -501,7 +501,7 @@ struct spritetypebase
|
|||
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.
|
||||
FTextureID walltype::walltexture() const
|
||||
const FTextureID walltype::walltexture() const
|
||||
{
|
||||
return tileGetTextureID(wallpicnum);
|
||||
}
|
||||
FTextureID walltype::overtexture() const
|
||||
const FTextureID walltype::overtexture() const
|
||||
{
|
||||
return tileGetTextureID(overpicnum);
|
||||
}
|
||||
|
@ -712,7 +712,7 @@ const FTextureID sectortype::floortexture() const
|
|||
return tileGetTextureID(floorpicnum);
|
||||
}
|
||||
|
||||
FTextureID spritetypebase::spritetexture() const
|
||||
const FTextureID spritetypebase::spritetexture() const
|
||||
{
|
||||
return tileGetTextureID(picnum);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue