Commit db2a9cb6 authored by Max Kellermann's avatar Max Kellermann

tag/Builder: use [[gnu::pure]]

parent 7caeb3b0
......@@ -236,11 +236,6 @@ TagBuilder::AddItem(TagType type, StringView value) noexcept
void
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));
}
......
......@@ -22,7 +22,6 @@
#include "Type.h"
#include "Chrono.hxx"
#include "util/Compiler.h"
#include <vector>
#include <memory>
......@@ -83,7 +82,7 @@ public:
/**
* Returns true if the object contains any information.
*/
gcc_pure
[[gnu::pure]]
bool IsDefined() const noexcept {
return !duration.IsNegative() || has_playlist || !empty();
}
......@@ -125,7 +124,7 @@ public:
* Checks whether the tag contains one or more items with
* the specified type.
*/
gcc_pure
[[gnu::pure]]
bool HasType(TagType type) const noexcept;
/**
......@@ -147,7 +146,6 @@ public:
* @param value the value of the tag item (not null-terminated)
* @param length the length of #value
*/
gcc_nonnull_all
void AddItem(TagType type, StringView value) noexcept;
/**
......@@ -156,7 +154,7 @@ public:
* @param type the type of the new tag item
* @param value the value of the tag item (null-terminated)
*/
gcc_nonnull_all
[[gnu::nonnull]]
void AddItem(TagType type, const char *value) noexcept;
/**
......@@ -177,7 +175,6 @@ public:
void RemoveType(TagType type) noexcept;
private:
gcc_nonnull_all
void AddItemInternal(TagType type, StringView value) noexcept;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment