use [[gnu::...]] attributes

This commit is contained in:
Max Kellermann
2023-03-06 15:57:36 +01:00
parent 3b9aab0684
commit 42f6a0441c
101 changed files with 167 additions and 234 deletions
-1
View File
@@ -5,7 +5,6 @@
#define MPD_TAG_HANDLER_HXX
#include "Chrono.hxx"
#include "util/Compiler.h"
#include <cstddef>
#include <cstdint>
+2 -2
View File
@@ -55,7 +55,7 @@
#define ID3_FRAME_MOOD "TMOO"
#endif
gcc_pure
[[gnu::pure]]
static Id3String
tag_id3_getstring(const struct id3_frame *frame, unsigned i) noexcept
{
@@ -186,7 +186,7 @@ tag_id3_import_comment(const struct id3_tag *tag, const char *id, TagType type,
* Parse a TXXX name, and convert it to a TagType enum value.
* Returns TAG_NUM_OF_ITEM_TYPES if the TXXX name is not understood.
*/
gcc_pure
[[gnu::pure]]
static TagType
tag_id3_parse_txxx_name(const char *name) noexcept
{
+2 -2
View File
@@ -43,7 +43,7 @@ ParseReplayGainTag(ReplayGainInfo &info,
const char *name;
const char *value;
gcc_pure
[[gnu::pure]]
const char *operator[](const char *n) const noexcept {
return StringEqualsCaseASCII(name, n)
? value
@@ -60,7 +60,7 @@ ParseReplayGainVorbis(ReplayGainInfo &info, std::string_view entry) noexcept
struct VorbisCommentEntry {
std::string_view entry;
gcc_pure
[[gnu::pure]]
const char *operator[](std::string_view n) const noexcept {
return GetVorbisCommentValue(entry, n).data();
}