mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Add a system-wide BIT_N macro, implemented via an LUT on SH, and use it in the TAGCACHE_IS_* macros in place of per-set LUTs, removing duplication of data between those LUTs and the mask values used on other targets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21195 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
fe72c890a7
commit
de7c5711c5
5 changed files with 29 additions and 31 deletions
|
@ -22,6 +22,7 @@
|
|||
#ifndef _TAGCACHE_H
|
||||
#define _TAGCACHE_H
|
||||
|
||||
#include "system.h"
|
||||
#include "metadata.h"
|
||||
|
||||
/**
|
||||
|
@ -103,12 +104,7 @@ enum tag_type { tag_artist = 0, tag_album, tag_genre, tag_title,
|
|||
(1LU << tag_virt_playtime_min) | (1LU << tag_virt_playtime_sec) | \
|
||||
(1LU << tag_virt_entryage) | (1LU << tag_virt_autoscore))
|
||||
|
||||
#ifdef CPU_SH
|
||||
extern const char tagcache_numeric_tags[];
|
||||
#define TAGCACHE_IS_NUMERIC(tag) ((bool)tagcache_numeric_tags[tag])
|
||||
#else
|
||||
#define TAGCACHE_IS_NUMERIC(tag) ((1LU << tag) & TAGCACHE_NUMERIC_TAGS)
|
||||
#endif
|
||||
#define TAGCACHE_IS_NUMERIC(tag) (BIT_N(tag) & TAGCACHE_NUMERIC_TAGS)
|
||||
|
||||
/* Flags */
|
||||
#define FLAG_DELETED 0x0001 /* Entry has been removed from db */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue