TagType: reduce the enum size to 1 byte
Reduce the TagItem overhead.
This commit is contained in:
parent
3c92c69bc7
commit
04bc9005ae
@ -35,7 +35,7 @@ struct TagItem {
|
|||||||
/**
|
/**
|
||||||
* the value of this tag; this is a variable length string
|
* the value of this tag; this is a variable length string
|
||||||
*/
|
*/
|
||||||
char value[sizeof(long)];
|
char value[sizeof(long) - sizeof(type)];
|
||||||
|
|
||||||
TagItem() = default;
|
TagItem() = default;
|
||||||
TagItem(const TagItem &other) = delete;
|
TagItem(const TagItem &other) = delete;
|
||||||
|
@ -20,10 +20,21 @@
|
|||||||
#ifndef MPD_TAG_TYPE_H
|
#ifndef MPD_TAG_TYPE_H
|
||||||
#define MPD_TAG_TYPE_H
|
#define MPD_TAG_TYPE_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Codes for the type of a tag item.
|
* Codes for the type of a tag item.
|
||||||
*/
|
*/
|
||||||
enum tag_type {
|
enum tag_type
|
||||||
|
#ifdef __cplusplus
|
||||||
|
/* the size of this enum is 1 byte; this is only relevant for C++
|
||||||
|
code; the only C sources including this header don't use instances
|
||||||
|
of this enum, they only refer to the integer values */
|
||||||
|
: uint8_t
|
||||||
|
#endif
|
||||||
|
{
|
||||||
TAG_ARTIST,
|
TAG_ARTIST,
|
||||||
TAG_ARTIST_SORT,
|
TAG_ARTIST_SORT,
|
||||||
TAG_ALBUM,
|
TAG_ALBUM,
|
||||||
|
Loading…
Reference in New Issue
Block a user