* 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:
parent
3927ba4b3d
commit
afd785cf43
@ -43,6 +43,32 @@ BLocker FontCacheEntry::sUsageUpdateLock("FontCacheEntry usage lock");
|
|||||||
|
|
||||||
|
|
||||||
class FontCacheEntry::GlyphCachePool {
|
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:
|
public:
|
||||||
GlyphCachePool()
|
GlyphCachePool()
|
||||||
{
|
{
|
||||||
@ -92,31 +118,6 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
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;
|
typedef BOpenHashTable<GlyphHashTableDefinition> GlyphTable;
|
||||||
|
|
||||||
GlyphTable fGlyphTable;
|
GlyphTable fGlyphTable;
|
||||||
|
Loading…
Reference in New Issue
Block a user