Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
04bc9005
Commit
04bc9005
authored
Sep 26, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TagType: reduce the enum size to 1 byte
Reduce the TagItem overhead.
parent
3c92c69b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
TagItem.hxx
src/tag/TagItem.hxx
+1
-1
TagType.h
src/tag/TagType.h
+12
-1
No files found.
src/tag/TagItem.hxx
View file @
04bc9005
...
...
@@ -35,7 +35,7 @@ struct TagItem {
/**
* the value of this tag; this is a variable length string
*/
char
value
[
sizeof
(
long
)];
char
value
[
sizeof
(
long
)
-
sizeof
(
type
)
];
TagItem
()
=
default
;
TagItem
(
const
TagItem
&
other
)
=
delete
;
...
...
src/tag/TagType.h
View file @
04bc9005
...
...
@@ -20,10 +20,21 @@
#ifndef MPD_TAG_TYPE_H
#define MPD_TAG_TYPE_H
#ifdef __cplusplus
#include <stdint.h>
#endif
/**
* 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_SORT
,
TAG_ALBUM
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment