Commit 3ef7d8fe authored by Max Kellermann's avatar Max Kellermann

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

parent ffde7223
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include "Type.h" // IWYU pragma: export #include "Type.h" // IWYU pragma: export
#include "Item.hxx" // IWYU pragma: export #include "Item.hxx" // IWYU pragma: export
#include "Chrono.hxx" #include "Chrono.hxx"
#include "util/Compiler.h"
#include "util/DereferenceIterator.hxx" #include "util/DereferenceIterator.hxx"
#include <memory> #include <memory>
...@@ -145,14 +144,14 @@ struct Tag { ...@@ -145,14 +144,14 @@ struct Tag {
* Returns the first value of the specified tag type, or * Returns the first value of the specified tag type, or
* nullptr if none is present in this tag object. * nullptr if none is present in this tag object.
*/ */
gcc_pure [[gnu::pure]]
const char *GetValue(TagType type) const noexcept; const char *GetValue(TagType type) const noexcept;
/** /**
* 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;
/** /**
...@@ -161,7 +160,7 @@ struct Tag { ...@@ -161,7 +160,7 @@ struct Tag {
* (e.g. #TAG_ALBUM_ARTIST falls back to #TAG_ARTIST). If * (e.g. #TAG_ALBUM_ARTIST falls back to #TAG_ARTIST). If
* there is no such value, returns an empty string. * there is no such value, returns an empty string.
*/ */
gcc_pure gcc_returns_nonnull [[gnu::pure]] [[gnu::returns_nonnull]]
const char *GetSortValue(TagType type) const noexcept; const char *GetSortValue(TagType type) const noexcept;
using const_iterator = DereferenceIterator<TagItem *const*, using const_iterator = DereferenceIterator<TagItem *const*,
......
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