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
db2a9cb6
Commit
db2a9cb6
authored
Oct 13, 2021
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tag/Builder: use [[gnu::pure]]
parent
7caeb3b0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
11 deletions
+3
-11
Builder.cxx
src/tag/Builder.cxx
+0
-5
Builder.hxx
src/tag/Builder.hxx
+3
-6
No files found.
src/tag/Builder.cxx
View file @
db2a9cb6
...
@@ -236,11 +236,6 @@ TagBuilder::AddItem(TagType type, StringView value) noexcept
...
@@ -236,11 +236,6 @@ TagBuilder::AddItem(TagType type, StringView value) noexcept
void
void
TagBuilder
::
AddItem
(
TagType
type
,
const
char
*
value
)
noexcept
TagBuilder
::
AddItem
(
TagType
type
,
const
char
*
value
)
noexcept
{
{
#if !CLANG_CHECK_VERSION(3,6)
/* disabled on clang due to -Wtautological-pointer-compare */
assert
(
value
!=
nullptr
);
#endif
AddItem
(
type
,
StringView
(
value
));
AddItem
(
type
,
StringView
(
value
));
}
}
...
...
src/tag/Builder.hxx
View file @
db2a9cb6
...
@@ -22,7 +22,6 @@
...
@@ -22,7 +22,6 @@
#include "Type.h"
#include "Type.h"
#include "Chrono.hxx"
#include "Chrono.hxx"
#include "util/Compiler.h"
#include <vector>
#include <vector>
#include <memory>
#include <memory>
...
@@ -83,7 +82,7 @@ public:
...
@@ -83,7 +82,7 @@ public:
/**
/**
* Returns true if the object contains any information.
* Returns true if the object contains any information.
*/
*/
gcc_pure
[[
gnu
::
pure
]]
bool
IsDefined
()
const
noexcept
{
bool
IsDefined
()
const
noexcept
{
return
!
duration
.
IsNegative
()
||
has_playlist
||
!
empty
();
return
!
duration
.
IsNegative
()
||
has_playlist
||
!
empty
();
}
}
...
@@ -125,7 +124,7 @@ public:
...
@@ -125,7 +124,7 @@ public:
* Checks whether the tag contains one or more items with
* Checks whether the tag contains one or more items with
* the specified type.
* the specified type.
*/
*/
gcc_pure
[[
gnu
::
pure
]]
bool
HasType
(
TagType
type
)
const
noexcept
;
bool
HasType
(
TagType
type
)
const
noexcept
;
/**
/**
...
@@ -147,7 +146,6 @@ public:
...
@@ -147,7 +146,6 @@ public:
* @param value the value of the tag item (not null-terminated)
* @param value the value of the tag item (not null-terminated)
* @param length the length of #value
* @param length the length of #value
*/
*/
gcc_nonnull_all
void
AddItem
(
TagType
type
,
StringView
value
)
noexcept
;
void
AddItem
(
TagType
type
,
StringView
value
)
noexcept
;
/**
/**
...
@@ -156,7 +154,7 @@ public:
...
@@ -156,7 +154,7 @@ public:
* @param type the type of the new tag item
* @param type the type of the new tag item
* @param value the value of the tag item (null-terminated)
* @param value the value of the tag item (null-terminated)
*/
*/
gcc_nonnull_all
[[
gnu
::
nonnull
]]
void
AddItem
(
TagType
type
,
const
char
*
value
)
noexcept
;
void
AddItem
(
TagType
type
,
const
char
*
value
)
noexcept
;
/**
/**
...
@@ -177,7 +175,6 @@ public:
...
@@ -177,7 +175,6 @@ public:
void
RemoveType
(
TagType
type
)
noexcept
;
void
RemoveType
(
TagType
type
)
noexcept
;
private
:
private
:
gcc_nonnull_all
void
AddItemInternal
(
TagType
type
,
StringView
value
)
noexcept
;
void
AddItemInternal
(
TagType
type
,
StringView
value
)
noexcept
;
};
};
...
...
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