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
71f1ec0b
Commit
71f1ec0b
authored
Dec 20, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tag/Id3Scan: return std::unique_ptr<Tag>
parent
99f4bce1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
MadDecoderPlugin.cxx
src/decoder/plugins/MadDecoderPlugin.cxx
+2
-2
Id3Scan.cxx
src/tag/Id3Scan.cxx
+2
-2
Id3Scan.hxx
src/tag/Id3Scan.hxx
+3
-1
No files found.
src/decoder/plugins/MadDecoderPlugin.cxx
View file @
71f1ec0b
...
...
@@ -351,10 +351,10 @@ MadDecoder::ParseId3(size_t tagsize, Tag **mpd_tag)
}
if
(
mpd_tag
)
{
Tag
*
tmp_tag
=
tag_id3_import
(
id3_tag
);
auto
tmp_tag
=
tag_id3_import
(
id3_tag
);
if
(
tmp_tag
!=
nullptr
)
{
delete
*
mpd_tag
;
*
mpd_tag
=
tmp_tag
;
*
mpd_tag
=
tmp_tag
.
release
()
;
}
}
...
...
src/tag/Id3Scan.cxx
View file @
71f1ec0b
...
...
@@ -330,14 +330,14 @@ scan_id3_tag(struct id3_tag *tag,
tag_id3_import_ufid
(
tag
,
handler
,
handler_ctx
);
}
Tag
*
std
::
unique_ptr
<
Tag
>
tag_id3_import
(
struct
id3_tag
*
tag
)
{
TagBuilder
tag_builder
;
scan_id3_tag
(
tag
,
add_tag_handler
,
&
tag_builder
);
return
tag_builder
.
empty
()
?
nullptr
:
tag_builder
.
CommitNew
()
.
release
()
;
:
tag_builder
.
CommitNew
();
}
bool
...
...
src/tag/Id3Scan.hxx
View file @
71f1ec0b
...
...
@@ -22,6 +22,8 @@
#include "check.h"
#include <memory>
class
InputStream
;
struct
TagHandler
;
struct
Tag
;
...
...
@@ -31,7 +33,7 @@ bool
tag_id3_scan
(
InputStream
&
is
,
const
TagHandler
&
handler
,
void
*
handler_ctx
);
Tag
*
std
::
unique_ptr
<
Tag
>
tag_id3_import
(
id3_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