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.

(cherry picked from commit 9c6c0a0966)
This commit is contained in:
Peter Nelson
2021-05-01 08:54:05 +01:00
committed by Jonathan G Rennison
parent dc746288ce
commit 78ccee01d4
2 changed files with 3 additions and 7 deletions

View File

@@ -49,7 +49,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.