* 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
This commit is contained in:
Oliver Tappe 2011-01-10 13:37:45 +00:00
parent 3927ba4b3d
commit afd785cf43

View File

@ -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<GlyphHashTableDefinition> GlyphTable;
GlyphTable fGlyphTable;