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
ed5c0d65
Commit
ed5c0d65
authored
Oct 19, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tag/Id3Scan: make struct id3_tag pointers `const`
parent
86dc6210
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
Id3Scan.cxx
src/tag/Id3Scan.cxx
+6
-6
Id3Scan.hxx
src/tag/Id3Scan.hxx
+2
-2
No files found.
src/tag/Id3Scan.cxx
View file @
ed5c0d65
...
@@ -142,7 +142,7 @@ tag_id3_import_text_frame(const struct id3_frame *frame,
...
@@ -142,7 +142,7 @@ tag_id3_import_text_frame(const struct id3_frame *frame,
* 4.2). This is a wrapper for tag_id3_import_text_frame().
* 4.2). This is a wrapper for tag_id3_import_text_frame().
*/
*/
static
void
static
void
tag_id3_import_text
(
struct
id3_tag
*
tag
,
const
char
*
id
,
TagType
type
,
tag_id3_import_text
(
const
struct
id3_tag
*
tag
,
const
char
*
id
,
TagType
type
,
TagHandler
&
handler
)
noexcept
TagHandler
&
handler
)
noexcept
{
{
const
struct
id3_frame
*
frame
;
const
struct
id3_frame
*
frame
;
...
@@ -191,7 +191,7 @@ tag_id3_import_comment_frame(const struct id3_frame *frame, TagType type,
...
@@ -191,7 +191,7 @@ tag_id3_import_comment_frame(const struct id3_frame *frame, TagType type,
* wrapper for tag_id3_import_comment_frame().
* wrapper for tag_id3_import_comment_frame().
*/
*/
static
void
static
void
tag_id3_import_comment
(
struct
id3_tag
*
tag
,
const
char
*
id
,
TagType
type
,
tag_id3_import_comment
(
const
struct
id3_tag
*
tag
,
const
char
*
id
,
TagType
type
,
TagHandler
&
handler
)
noexcept
TagHandler
&
handler
)
noexcept
{
{
const
struct
id3_frame
*
frame
;
const
struct
id3_frame
*
frame
;
...
@@ -217,7 +217,7 @@ tag_id3_parse_txxx_name(const char *name) noexcept
...
@@ -217,7 +217,7 @@ tag_id3_parse_txxx_name(const char *name) noexcept
* Import all known MusicBrainz tags from TXXX frames.
* Import all known MusicBrainz tags from TXXX frames.
*/
*/
static
void
static
void
tag_id3_import_musicbrainz
(
struct
id3_tag
*
id3_tag
,
tag_id3_import_musicbrainz
(
const
struct
id3_tag
*
id3_tag
,
TagHandler
&
handler
)
noexcept
TagHandler
&
handler
)
noexcept
{
{
for
(
unsigned
i
=
0
;;
++
i
)
{
for
(
unsigned
i
=
0
;;
++
i
)
{
...
@@ -250,7 +250,7 @@ tag_id3_import_musicbrainz(struct id3_tag *id3_tag,
...
@@ -250,7 +250,7 @@ tag_id3_import_musicbrainz(struct id3_tag *id3_tag,
* Imports the MusicBrainz TrackId from the UFID tag.
* Imports the MusicBrainz TrackId from the UFID tag.
*/
*/
static
void
static
void
tag_id3_import_ufid
(
struct
id3_tag
*
id3_tag
,
tag_id3_import_ufid
(
const
struct
id3_tag
*
id3_tag
,
TagHandler
&
handler
)
noexcept
TagHandler
&
handler
)
noexcept
{
{
for
(
unsigned
i
=
0
;;
++
i
)
{
for
(
unsigned
i
=
0
;;
++
i
)
{
...
@@ -283,7 +283,7 @@ tag_id3_import_ufid(struct id3_tag *id3_tag,
...
@@ -283,7 +283,7 @@ tag_id3_import_ufid(struct id3_tag *id3_tag,
}
}
void
void
scan_id3_tag
(
struct
id3_tag
*
tag
,
TagHandler
&
handler
)
noexcept
scan_id3_tag
(
const
struct
id3_tag
*
tag
,
TagHandler
&
handler
)
noexcept
{
{
tag_id3_import_text
(
tag
,
ID3_FRAME_ARTIST
,
TAG_ARTIST
,
tag_id3_import_text
(
tag
,
ID3_FRAME_ARTIST
,
TAG_ARTIST
,
handler
);
handler
);
...
@@ -323,7 +323,7 @@ scan_id3_tag(struct id3_tag *tag, TagHandler &handler) noexcept
...
@@ -323,7 +323,7 @@ scan_id3_tag(struct id3_tag *tag, TagHandler &handler) noexcept
}
}
std
::
unique_ptr
<
Tag
>
std
::
unique_ptr
<
Tag
>
tag_id3_import
(
struct
id3_tag
*
tag
)
tag_id3_import
(
const
struct
id3_tag
*
tag
)
noexcept
{
{
TagBuilder
tag_builder
;
TagBuilder
tag_builder
;
AddTagHandler
h
(
tag_builder
);
AddTagHandler
h
(
tag_builder
);
...
...
src/tag/Id3Scan.hxx
View file @
ed5c0d65
...
@@ -33,13 +33,13 @@ bool
...
@@ -33,13 +33,13 @@ bool
tag_id3_scan
(
InputStream
&
is
,
TagHandler
&
handler
)
noexcept
;
tag_id3_scan
(
InputStream
&
is
,
TagHandler
&
handler
)
noexcept
;
std
::
unique_ptr
<
Tag
>
std
::
unique_ptr
<
Tag
>
tag_id3_import
(
id3_tag
*
)
;
tag_id3_import
(
const
struct
id3_tag
*
)
noexcept
;
/**
/**
* Import all tags from the provided id3_tag *tag
* Import all tags from the provided id3_tag *tag
*
*
*/
*/
void
void
scan_id3_tag
(
id3_tag
*
tag
,
TagHandler
&
handler
)
noexcept
;
scan_id3_tag
(
const
struct
id3_tag
*
tag
,
TagHandler
&
handler
)
noexcept
;
#endif
#endif
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