From abed633fcbacdb1a727ca03e19f23eb2afe5a8e9 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 13 Oct 2021 10:33:57 +0200 Subject: [PATCH] tag/FixString: use [[gnu::pure]] --- src/tag/FixString.cxx | 4 ++-- src/tag/FixString.hxx | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/tag/FixString.cxx b/src/tag/FixString.cxx index 23a872068..f2069f033 100644 --- a/src/tag/FixString.cxx +++ b/src/tag/FixString.cxx @@ -29,7 +29,7 @@ #include -gcc_pure +[[gnu::pure]] static const char * FindInvalidUTF8(const char *p, const char *const end) noexcept { @@ -116,7 +116,7 @@ clear_non_printable(StringView src) return { dest, src.size }; } -gcc_pure +[[gnu::pure]] static bool IsSafe(StringView s) noexcept { diff --git a/src/tag/FixString.hxx b/src/tag/FixString.hxx index 819c72d3b..881763212 100644 --- a/src/tag/FixString.hxx +++ b/src/tag/FixString.hxx @@ -20,12 +20,9 @@ #ifndef MPD_TAG_STRING_HXX #define MPD_TAG_STRING_HXX -#include "util/Compiler.h" - struct StringView; template struct WritableBuffer; -gcc_nonnull_all WritableBuffer FixTagString(StringView p);