Commit 08491fcd authored by Max Kellermann's avatar Max Kellermann

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

parent abed633f
...@@ -52,7 +52,7 @@ IsUnsafeChar(char ch) ...@@ -52,7 +52,7 @@ IsUnsafeChar(char ch)
(unsigned char)ch < 0x20; (unsigned char)ch < 0x20;
} }
gcc_pure [[gnu::pure]]
static bool static bool
HasUnsafeChar(const char *s) noexcept HasUnsafeChar(const char *s) noexcept
{ {
...@@ -78,7 +78,7 @@ SanitizeString(const char *s, char *buffer, size_t buffer_size) noexcept ...@@ -78,7 +78,7 @@ SanitizeString(const char *s, char *buffer, size_t buffer_size) noexcept
return buffer; return buffer;
} }
gcc_pure gcc_nonnull_all [[gnu::pure]] [[gnu::nonnull]]
static const char * static const char *
TagGetter(const void *object, const char *name) noexcept TagGetter(const void *object, const char *name) noexcept
{ {
......
...@@ -20,11 +20,9 @@ ...@@ -20,11 +20,9 @@
#ifndef MPD_TAG_FORMAT_HXX #ifndef MPD_TAG_FORMAT_HXX
#define MPD_TAG_FORMAT_HXX #define MPD_TAG_FORMAT_HXX
#include "util/Compiler.h"
struct Tag; struct Tag;
gcc_malloc gcc_nonnull_all [[gnu::malloc]] [[gnu::nonnull]]
char * char *
FormatTag(const Tag &tag, const char *format) noexcept; FormatTag(const Tag &tag, const char *format) 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