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
db20e29a
Commit
db20e29a
authored
Feb 23, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Directory: pass std::string&& to constructor
parent
5f5c95cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
Directory.cxx
src/db/Directory.cxx
+2
-2
Directory.hxx
src/db/Directory.hxx
+2
-2
No files found.
src/db/Directory.cxx
View file @
db20e29a
...
...
@@ -41,10 +41,10 @@ extern "C" {
#include <string.h>
#include <stdlib.h>
Directory
::
Directory
(
const
char
*
_path_utf8
,
Directory
*
_parent
)
Directory
::
Directory
(
std
::
string
&&
_path_utf8
,
Directory
*
_parent
)
:
parent
(
_parent
),
mtime
(
0
),
have_stat
(
false
),
path
(
_path_utf8
)
path
(
std
::
move
(
_path_utf8
)
)
{
INIT_LIST_HEAD
(
&
children
);
INIT_LIST_HEAD
(
&
songs
);
...
...
src/db/Directory.hxx
View file @
db20e29a
...
...
@@ -85,7 +85,7 @@ struct Directory {
std
::
string
path
;
public
:
Directory
(
const
char
*
_path_utf8
,
Directory
*
_parent
);
Directory
(
std
::
string
&&
_path_utf8
,
Directory
*
_parent
);
~
Directory
();
/**
...
...
@@ -93,7 +93,7 @@ public:
*/
gcc_malloc
static
Directory
*
NewRoot
()
{
return
new
Directory
(
""
,
nullptr
);
return
new
Directory
(
std
::
string
()
,
nullptr
);
}
/**
...
...
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