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
40c6a214
Commit
40c6a214
authored
Aug 20, 2021
by
Rosen Penev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unique_ptr/new to make_unique
The latter is easier to read and is the "correct" thing to do. Signed-off-by:
Rosen Penev
<
rosenp@gmail.com
>
parent
bedcf1cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
ConvertFilterPlugin.cxx
src/filter/plugins/ConvertFilterPlugin.cxx
+1
-1
Builder.cxx
src/tag/Builder.cxx
+1
-1
No files found.
src/filter/plugins/ConvertFilterPlugin.cxx
View file @
40c6a214
...
...
@@ -121,7 +121,7 @@ std::unique_ptr<Filter>
convert_filter_new
(
const
AudioFormat
in_audio_format
,
const
AudioFormat
out_audio_format
)
{
std
::
unique_ptr
<
ConvertFilter
>
filter
(
new
ConvertFilter
(
in_audio_format
)
);
auto
filter
=
std
::
make_unique
<
ConvertFilter
>
(
in_audio_format
);
filter
->
Set
(
out_audio_format
);
return
filter
;
}
...
...
src/tag/Builder.cxx
View file @
40c6a214
...
...
@@ -158,7 +158,7 @@ TagBuilder::Commit() noexcept
std
::
unique_ptr
<
Tag
>
TagBuilder
::
CommitNew
()
noexcept
{
std
::
unique_ptr
<
Tag
>
tag
(
new
Tag
()
);
auto
tag
=
std
::
make_unique
<
Tag
>
(
);
Commit
(
*
tag
);
return
tag
;
}
...
...
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