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
f3cefaf0
Commit
f3cefaf0
authored
Feb 23, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tag/Tag: move code to MoveItemsFrom()
parent
b3460f3f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
Tag.hxx
src/tag/Tag.hxx
+9
-1
No files found.
src/tag/Tag.hxx
View file @
f3cefaf0
...
@@ -80,9 +80,17 @@ struct Tag {
...
@@ -80,9 +80,17 @@ struct Tag {
Tag
&
operator
=
(
Tag
&&
other
)
{
Tag
&
operator
=
(
Tag
&&
other
)
{
duration
=
other
.
duration
;
duration
=
other
.
duration
;
has_playlist
=
other
.
has_playlist
;
has_playlist
=
other
.
has_playlist
;
MoveItemsFrom
(
std
::
move
(
other
));
return
*
this
;
}
/**
* Similar to the move operator, but move only the #TagItem
* array.
*/
void
MoveItemsFrom
(
Tag
&&
other
)
{
std
::
swap
(
items
,
other
.
items
);
std
::
swap
(
items
,
other
.
items
);
std
::
swap
(
num_items
,
other
.
num_items
);
std
::
swap
(
num_items
,
other
.
num_items
);
return
*
this
;
}
}
/**
/**
...
...
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