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
469cd958
Unverified
Commit
469cd958
authored
Jan 31, 2020
by
Rosen Penev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[clang-tidy] use make_unique
Found with modernize-make-unique Signed-off-by:
Rosen Penev
<
rosenp@gmail.com
>
parent
bc6eca21
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
DatabaseCommands.cxx
src/command/DatabaseCommands.cxx
+4
-4
SimpleDatabasePlugin.cxx
src/db/plugins/simple/SimpleDatabasePlugin.cxx
+1
-1
WavpackDecoderPlugin.cxx
src/decoder/plugins/WavpackDecoderPlugin.cxx
+1
-1
No files found.
src/command/DatabaseCommands.cxx
View file @
469cd958
...
...
@@ -227,7 +227,7 @@ handle_list_file(Client &client, Request args, Response &r)
std
::
unique_ptr
<
SongFilter
>
filter
;
if
(
!
args
.
empty
())
{
filter
.
reset
(
new
SongFilter
()
);
filter
=
std
::
make_unique
<
SongFilter
>
(
);
try
{
filter
->
Parse
(
args
,
false
);
}
catch
(...)
{
...
...
@@ -272,8 +272,8 @@ handle_list(Client &client, Request args, Response &r)
return
CommandResult
::
ERROR
;
}
filter
.
reset
(
new
SongFilter
(
TAG_ARTIST
,
args
.
shift
())
)
;
filter
=
std
::
make_unique
<
SongFilter
>
(
TAG_ARTIST
,
args
.
shift
());
}
while
(
args
.
size
>=
2
&&
...
...
@@ -302,7 +302,7 @@ handle_list(Client &client, Request args, Response &r)
tag_types
.
emplace_back
(
tagType
);
if
(
!
args
.
empty
())
{
filter
.
reset
(
new
SongFilter
()
);
filter
=
std
::
make_unique
<
SongFilter
>
(
);
try
{
filter
->
Parse
(
args
,
false
);
}
catch
(...)
{
...
...
src/db/plugins/simple/SimpleDatabasePlugin.cxx
View file @
469cd958
...
...
@@ -365,7 +365,7 @@ SimpleDatabase::Save()
#ifdef ENABLE_ZLIB
std
::
unique_ptr
<
GzipOutputStream
>
gzip
;
if
(
compress
)
{
gzip
.
reset
(
new
GzipOutputStream
(
*
os
)
);
gzip
=
std
::
make_unique
<
GzipOutputStream
>
(
*
os
);
os
=
gzip
.
get
();
}
#endif
...
...
src/decoder/plugins/WavpackDecoderPlugin.cxx
View file @
469cd958
...
...
@@ -544,7 +544,7 @@ wavpack_streamdecode(DecoderClient &client, InputStream &is)
open_flags
|=
OPEN_WVC
;
can_seek
&=
is_wvc
->
IsSeekable
();
wvc
.
reset
(
new
WavpackInput
(
&
client
,
*
is_wvc
)
);
wvc
=
std
::
make_unique
<
WavpackInput
>
(
&
client
,
*
is_wvc
);
}
if
(
!
can_seek
)
{
...
...
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