From 3ef7d8fecb8115b126510dc38faa11e4be051cab Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 13 Oct 2021 10:30:43 +0200 Subject: [PATCH] tag/Tag: use [[gnu::pure]] --- src/tag/Tag.hxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/tag/Tag.hxx b/src/tag/Tag.hxx index aa409e2c1..b07e837d2 100644 --- a/src/tag/Tag.hxx +++ b/src/tag/Tag.hxx @@ -23,7 +23,6 @@ #include "Type.h" // IWYU pragma: export #include "Item.hxx" // IWYU pragma: export #include "Chrono.hxx" -#include "util/Compiler.h" #include "util/DereferenceIterator.hxx" #include @@ -145,14 +144,14 @@ struct Tag { * Returns the first value of the specified tag type, or * nullptr if none is present in this tag object. */ - gcc_pure + [[gnu::pure]] const char *GetValue(TagType type) const noexcept; /** * Checks whether the tag contains one or more items with * the specified type. */ - gcc_pure + [[gnu::pure]] bool HasType(TagType type) const noexcept; /** @@ -161,7 +160,7 @@ struct Tag { * (e.g. #TAG_ALBUM_ARTIST falls back to #TAG_ARTIST). If * 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; using const_iterator = DereferenceIterator