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
+4 -5
View File
@@ -7,7 +7,6 @@
#include "ObjectManager.hxx"
#include "util/SpanCast.hxx"
#include "util/StringAPI.hxx"
#include "util/Compiler.h"
#include <functional>
#include <stdexcept>
@@ -15,7 +14,7 @@
namespace UDisks2 {
template<typename I>
gcc_pure
[[gnu::pure]]
static const char *
CheckString(I &&i) noexcept
{
@@ -26,7 +25,7 @@ CheckString(I &&i) noexcept
}
template<typename I>
gcc_pure
[[gnu::pure]]
static std::string_view
CheckRecursedByteArrayToString(I &&i) noexcept
{
@@ -38,7 +37,7 @@ CheckRecursedByteArrayToString(I &&i) noexcept
}
template<typename I>
gcc_pure
[[gnu::pure]]
static std::string_view
CheckByteArrayToString(I &&i) noexcept
{
@@ -49,7 +48,7 @@ CheckByteArrayToString(I &&i) noexcept
}
template<typename I>
gcc_pure
[[gnu::pure]]
static std::string_view
CheckByteArrayArrayFrontToString(I &&i) noexcept
{
-1
View File
@@ -7,7 +7,6 @@
#include "Lease.hxx"
#include "Callback.hxx"
#include "event/InjectEvent.hxx"
#include "util/Compiler.h"
#include <cstddef>
#include <cstdint>
-1
View File
@@ -4,7 +4,6 @@
#ifndef MPD_SQLITE_UTIL_HXX
#define MPD_SQLITE_UTIL_HXX
#include "util/Compiler.h"
#include "Error.hxx"
#include <sqlite3.h>
-2
View File
@@ -4,8 +4,6 @@
#ifndef MPD_UPNP_ACTION_HXX
#define MPD_UPNP_ACTION_HXX
#include "util/Compiler.h"
#include <upnptools.h>
static constexpr unsigned
-1
View File
@@ -3,7 +3,6 @@
#include "FlacIOHandle.hxx"
#include "Log.hxx"
#include "util/Compiler.h"
#include "system/Error.hxx"
#include <cerrno>
+1 -3
View File
@@ -4,8 +4,6 @@
#ifndef MPD_FLAC_METADATA_ITERATOR_HXX
#define MPD_FLAC_METADATA_ITERATOR_HXX
#include "util/Compiler.h"
#include <FLAC/metadata.h>
class FlacMetadataIterator {
@@ -31,7 +29,7 @@ public:
return ::FLAC__metadata_iterator_next(iterator);
}
gcc_pure
[[gnu::pure]]
FLAC__StreamMetadata *GetBlock() noexcept {
return ::FLAC__metadata_iterator_get_block(iterator);
}
+1 -1
View File
@@ -59,7 +59,7 @@ flac_scan_comments(const FLAC__StreamMetadata_VorbisComment *comment,
ScanVorbisComment(ToStringView(comment->comments[i]), handler);
}
gcc_pure
[[gnu::pure]]
static inline SongTime
flac_duration(const FLAC__StreamMetadata_StreamInfo *stream_info) noexcept
{