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
bde27cce
Commit
bde27cce
authored
Jan 19, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tag: pack attributes tighter
This saves another 3% memory.
parent
d2cf7402
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
Tag.cxx
src/tag/Tag.cxx
+2
-2
Tag.hxx
src/tag/Tag.hxx
+5
-5
No files found.
src/tag/Tag.cxx
View file @
bde27cce
...
...
@@ -76,8 +76,8 @@ Tag::Clear()
Tag
::
Tag
(
const
Tag
&
other
)
:
time
(
other
.
time
),
has_playlist
(
other
.
has_playlist
),
items
(
nullptr
),
num_items
(
other
.
num_items
)
num_items
(
other
.
num_items
),
items
(
nullptr
)
{
if
(
num_items
>
0
)
{
items
=
new
TagItem
*
[
num_items
];
...
...
src/tag/Tag.hxx
View file @
bde27cce
...
...
@@ -47,23 +47,23 @@ struct Tag {
*/
bool
has_playlist
;
/** the total number of tag items in the #items array */
unsigned
short
num_items
;
/** an array of tag items */
TagItem
**
items
;
/** the total number of tag items in the #items array */
unsigned
num_items
;
/**
* Create an empty tag.
*/
Tag
()
:
time
(
-
1
),
has_playlist
(
false
),
items
(
nullptr
),
num_items
(
0
)
{}
num_items
(
0
),
items
(
nullptr
)
{}
Tag
(
const
Tag
&
other
);
Tag
(
Tag
&&
other
)
:
time
(
other
.
time
),
has_playlist
(
other
.
has_playlist
),
items
(
other
.
items
),
num_items
(
other
.
num_
items
)
{
num_items
(
other
.
num_items
),
items
(
other
.
items
)
{
other
.
items
=
nullptr
;
other
.
num_items
=
0
;
}
...
...
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