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
6239dd96
Commit
6239dd96
authored
Sep 05, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tag: remove unused methods
parent
57a4700f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
70 deletions
+0
-70
Tag.cxx
src/tag/Tag.cxx
+0
-56
Tag.hxx
src/tag/Tag.hxx
+0
-14
No files found.
src/tag/Tag.cxx
View file @
6239dd96
...
...
@@ -106,42 +106,6 @@ Tag::Clear()
num_items
=
0
;
}
void
Tag
::
DeleteItem
(
unsigned
idx
)
{
assert
(
idx
<
num_items
);
--
num_items
;
tag_pool_lock
.
lock
();
tag_pool_put_item
(
items
[
idx
]);
tag_pool_lock
.
unlock
();
if
(
num_items
-
idx
>
0
)
{
memmove
(
items
+
idx
,
items
+
idx
+
1
,
(
num_items
-
idx
)
*
sizeof
(
items
[
0
]));
}
if
(
num_items
>
0
)
{
items
=
(
TagItem
**
)
g_realloc
(
items
,
items_size
(
*
this
));
}
else
{
g_free
(
items
);
items
=
nullptr
;
}
}
void
Tag
::
ClearItemsByType
(
tag_type
type
)
{
for
(
unsigned
i
=
0
;
i
<
num_items
;
i
++
)
{
if
(
items
[
i
]
->
type
==
type
)
{
DeleteItem
(
i
);
/* decrement since when just deleted this node */
i
--
;
}
}
}
Tag
::~
Tag
()
{
tag_pool_lock
.
lock
();
...
...
@@ -252,26 +216,6 @@ Tag::HasType(tag_type type) const
return
GetValue
(
type
)
!=
nullptr
;
}
bool
Tag
::
Equals
(
const
Tag
&
other
)
const
{
if
(
time
!=
other
.
time
)
return
false
;
if
(
num_items
!=
other
.
num_items
)
return
false
;
for
(
unsigned
i
=
0
;
i
<
num_items
;
i
++
)
{
if
(
items
[
i
]
->
type
!=
other
.
items
[
i
]
->
type
)
return
false
;
if
(
strcmp
(
items
[
i
]
->
value
,
other
.
items
[
i
]
->
value
))
{
return
false
;
}
}
return
true
;
}
/**
* Replace invalid sequences with the question mark.
*/
...
...
src/tag/Tag.hxx
View file @
6239dd96
...
...
@@ -117,13 +117,6 @@ struct Tag {
*/
void
Clear
();
void
DeleteItem
(
unsigned
i
);
/**
* Clear all tag items with the specified type.
*/
void
ClearItemsByType
(
tag_type
type
);
/**
* Gives an optional hint to the tag library that we will now
* add several tag items; this is used by the library to
...
...
@@ -187,13 +180,6 @@ struct Tag {
*/
bool
HasType
(
tag_type
type
)
const
;
/**
* Compares two tags, including the duration and all tag items. The
* order of the tag items matters.
*/
gcc_pure
bool
Equals
(
const
Tag
&
other
)
const
;
private
:
void
AddItemInternal
(
tag_type
type
,
const
char
*
value
,
size_t
len
);
};
...
...
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