Author: zooey Date: 2011-01-10 14:37:45 +0100 (Mon, 10 Jan 2011) New Revision: 40190 Changeset: http://dev.haiku-os.org/changeset/40190 Modified: haiku/trunk/src/servers/app/FontCacheEntry.cpp Log: * fix build of app-server in debug mode - thanks to Timothy Brown (stimut) for the hint that it was broken Modified: haiku/trunk/src/servers/app/FontCacheEntry.cpp =================================================================== --- haiku/trunk/src/servers/app/FontCacheEntry.cpp 2011-01-10 01:58:18 UTC (rev 40189) +++ haiku/trunk/src/servers/app/FontCacheEntry.cpp 2011-01-10 13:37:45 UTC (rev 40190) @@ -43,6 +43,32 @@ 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 @@ } 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<GlyphHashTableDefinition> GlyphTable; GlyphTable fGlyphTable;