Codechange: Scale sprite font height once on init instead of every call to GetHeight().

Scaling is not expensive, but it does not change either, and this avoids the need for a virtual method call. This cascades back to all GetCharacterHeight(FS_xxx) and FONT_HEIGHT_xxx calls.
This commit is contained in:
Peter Nelson
2021-05-01 08:54:05 +01:00
committed by PeterN
parent ce55cd0ce7
commit 9c6c0a0966
2 changed files with 3 additions and 7 deletions

View File

@@ -45,7 +45,7 @@ public:
* Get the height of the font.
* @return The height of the font.
*/
virtual int GetHeight() const { return this->height; }
inline int GetHeight() const { return this->height; }
/**
* Get the ascender value of the font.