Changeset - r26401:2323dfb85c1d
[Not reviewed]
master
0 3 0
Peter Nelson - 21 months ago 2022-09-17 22:23:51
peter1138@openttd.org
Cleanup: Remove unused GetUnicodeGlyph()
3 files changed with 1 insertions and 15 deletions:
0 comments (0 inline, 0 general)
src/fontcache.h
Show inline comments
 
@@ -72,13 +72,6 @@ public:
 
	virtual int GetFontSize() const { return this->height; }
 

	
 
	/**
 
	 * Get the SpriteID mapped to the given key
 
	 * @param key The key to get the sprite for.
 
	 * @return The sprite.
 
	 */
 
	virtual SpriteID GetUnicodeGlyph(WChar key) = 0;
 

	
 
	/**
 
	 * Map a SpriteID to the key
 
	 * @param key The key to map to.
 
	 * @param sprite The sprite that is being mapped.
 
@@ -166,12 +159,6 @@ public:
 
	virtual bool IsBuiltInFont() = 0;
 
};
 

	
 
/** Get the SpriteID mapped to the given font size and key */
 
static inline SpriteID GetUnicodeGlyph(FontSize size, WChar key)
 
{
 
	return FontCache::Get(size)->GetUnicodeGlyph(key);
 
}
 

	
 
/** Map a SpriteID to the font size and key */
 
static inline void SetUnicodeGlyph(FontSize size, WChar key, SpriteID sprite)
 
{
src/fontcache/spritefontcache.h
Show inline comments
 
@@ -17,12 +17,12 @@
 
class SpriteFontCache : public FontCache {
 
private:
 
	SpriteID **glyph_to_spriteid_map; ///< Mapping of glyphs to sprite IDs.
 
	SpriteID GetUnicodeGlyph(WChar key);
 

	
 
	void ClearGlyphToSpriteMap();
 
public:
 
	SpriteFontCache(FontSize fs);
 
	~SpriteFontCache();
 
	virtual SpriteID GetUnicodeGlyph(WChar key);
 
	virtual void SetUnicodeGlyph(WChar key, SpriteID sprite);
 
	virtual void InitializeUnicodeGlyphMap();
 
	virtual void ClearFontCache();
src/fontcache/truetypefontcache.h
Show inline comments
 
@@ -63,7 +63,6 @@ public:
 
	TrueTypeFontCache(FontSize fs, int pixels);
 
	virtual ~TrueTypeFontCache();
 
	int GetFontSize() const override { return this->used_size; }
 
	SpriteID GetUnicodeGlyph(WChar key) override { return this->parent->GetUnicodeGlyph(key); }
 
	void SetUnicodeGlyph(WChar key, SpriteID sprite) override { this->parent->SetUnicodeGlyph(key, sprite); }
 
	void InitializeUnicodeGlyphMap() override { this->parent->InitializeUnicodeGlyphMap(); }
 
	const Sprite *GetGlyph(GlyphID key) override;
0 comments (0 inline, 0 general)