use only generic structures
This commit is contained in:
parent
440e4499c7
commit
6503897ece
7 changed files with 35 additions and 121 deletions
|
|
@ -12,8 +12,14 @@
|
|||
#include "util.h"
|
||||
|
||||
// generic cache type
|
||||
static unsigned int hash(unsigned int code)
|
||||
{
|
||||
// identity map the ascii range
|
||||
if (code < 128) return code;
|
||||
return (uint32_t)((uint64_t)(code*2654435761)>>32);
|
||||
}
|
||||
#include "generic_cache.h"
|
||||
CACHE_DECL(cache, struct font_glyph)
|
||||
CACHE_DECL(cache, struct font_glyph, hash, hash_cp_u32)
|
||||
|
||||
|
||||
#define UTF8(c) (c&0x80)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue