From afd785cf43d3f0caad4a8e89023f15bdd2b4ecc3 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Mon, 10 Jan 2011 13:37:45 +0000 Subject: [PATCH] * fix build of app-server in debug mode - thanks to Timothy Brown (stimut) for the hint that it was broken git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40190 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/FontCacheEntry.cpp | 51 +++++++++++++++--------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/src/servers/app/FontCacheEntry.cpp b/src/servers/app/FontCacheEntry.cpp index b7943cafe1..5b11338828 100644 --- a/src/servers/app/FontCacheEntry.cpp +++ b/src/servers/app/FontCacheEntry.cpp @@ -43,6 +43,32 @@ BLocker FontCacheEntry::sUsageUpdateLock("FontCacheEntry usage lock"); class FontCacheEntry::GlyphCachePool { + // This class needs to be defined before any inline functions, as otherwise + // gcc2 will barf in debug mode. + struct GlyphHashTableDefinition { + typedef uint32 KeyType; + typedef GlyphCache ValueType; + + size_t HashKey(uint32 key) const + { + return key; + } + + size_t Hash(GlyphCache* value) const + { + return value->glyph_index; + } + + bool Compare(uint32 key, GlyphCache* value) const + { + return value->glyph_index == key; + } + + GlyphCache*& GetLink(GlyphCache* value) const + { + return value->hash_link; + } + }; public: GlyphCachePool() { @@ -92,31 +118,6 @@ public: } private: - struct GlyphHashTableDefinition { - typedef uint32 KeyType; - typedef GlyphCache ValueType; - - size_t HashKey(uint32 key) const - { - return key; - } - - size_t Hash(GlyphCache* value) const - { - return value->glyph_index; - } - - bool Compare(uint32 key, GlyphCache* value) const - { - return value->glyph_index == key; - } - - GlyphCache*& GetLink(GlyphCache* value) const - { - return value->hash_link; - } - }; - typedef BOpenHashTable GlyphTable; GlyphTable fGlyphTable;