use [[gnu::...]] attributes
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
#include "song/UriSongFilter.hxx"
|
||||
#include "song/BaseSongFilter.hxx"
|
||||
#include "song/TagSongFilter.hxx"
|
||||
#include "util/Compiler.h"
|
||||
#include "config/Block.hxx"
|
||||
#include "tag/Builder.hxx"
|
||||
#include "tag/Tag.hxx"
|
||||
@@ -265,7 +264,7 @@ ProxySong::ProxySong(const mpd_song *song)
|
||||
tag_builder.Commit(tag2);
|
||||
}
|
||||
|
||||
gcc_const
|
||||
[[gnu::const]]
|
||||
static enum mpd_tag_type
|
||||
Convert(TagType tag_type) noexcept
|
||||
{
|
||||
@@ -694,7 +693,7 @@ Visit(struct mpd_connection *connection,
|
||||
visit_directory, visit_song, visit_playlist);
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
static bool
|
||||
Match(const SongFilter *filter, const LightSong &song) noexcept
|
||||
{
|
||||
@@ -864,7 +863,7 @@ try {
|
||||
throw;
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
static bool
|
||||
IsFilterSupported(const ISongFilter &f) noexcept
|
||||
{
|
||||
@@ -890,7 +889,7 @@ IsFilterSupported(const ISongFilter &f) noexcept
|
||||
return false;
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
static bool
|
||||
IsFilterFullySupported(const SongFilter &filter,
|
||||
const struct mpd_connection *connection) noexcept
|
||||
@@ -908,7 +907,7 @@ IsFilterFullySupported(const SongFilter &filter,
|
||||
[](const auto &item) { return IsFilterSupported(*item); });
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
static bool
|
||||
IsFilterFullySupported(const SongFilter *filter,
|
||||
const struct mpd_connection *connection) noexcept
|
||||
@@ -917,7 +916,7 @@ IsFilterFullySupported(const SongFilter *filter,
|
||||
IsFilterFullySupported(*filter, connection);
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
static bool
|
||||
IsSortSupported(TagType tag_type,
|
||||
const struct mpd_connection *connection) noexcept
|
||||
@@ -939,7 +938,7 @@ IsSortSupported(TagType tag_type,
|
||||
return Convert(tag_type) != MPD_TAG_COUNT;
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
static DatabaseSelection
|
||||
CheckSelection(DatabaseSelection selection,
|
||||
struct mpd_connection *connection) noexcept
|
||||
|
@@ -193,7 +193,7 @@ Directory::FindSong(std::string_view name_utf8) const noexcept
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
static bool
|
||||
directory_cmp(const Directory &a, const Directory &b) noexcept
|
||||
{
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#define DIRECTORY_BEGIN "begin: "
|
||||
#define DIRECTORY_END "end: "
|
||||
|
||||
gcc_const
|
||||
[[gnu::const]]
|
||||
static const char *
|
||||
DeviceToTypeString(unsigned device) noexcept
|
||||
{
|
||||
@@ -44,7 +44,7 @@ DeviceToTypeString(unsigned device) noexcept
|
||||
}
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
static unsigned
|
||||
ParseTypeString(const char *type) noexcept
|
||||
{
|
||||
|
@@ -248,7 +248,7 @@ SimpleDatabase::ReturnSong([[maybe_unused]] const LightSong *song) const noexcep
|
||||
}
|
||||
}
|
||||
|
||||
gcc_const
|
||||
[[gnu::const]]
|
||||
static DatabaseSelection
|
||||
CheckSelection(DatabaseSelection selection) noexcept
|
||||
{
|
||||
|
@@ -47,7 +47,7 @@ Song::GetURI() const noexcept
|
||||
/**
|
||||
* Path name traversal of a #Directory.
|
||||
*/
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
static const Directory *
|
||||
FindTargetDirectory(const Directory &base, std::string_view path) noexcept
|
||||
{
|
||||
@@ -69,7 +69,7 @@ FindTargetDirectory(const Directory &base, std::string_view path) noexcept
|
||||
/**
|
||||
* Path name traversal of a #Song.
|
||||
*/
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
static const Song *
|
||||
FindTargetSong(const Directory &_directory, std::string_view target) noexcept
|
||||
{
|
||||
|
@@ -60,7 +60,7 @@ compare_tag_item(const Tag &a, const Tag &b, TagType type) noexcept
|
||||
}
|
||||
|
||||
/* Only used for sorting/searchin a songvec, not general purpose compares */
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
static bool
|
||||
song_cmp(const Song &a, const Song &b) noexcept
|
||||
{
|
||||
|
@@ -563,7 +563,7 @@ UpnpDatabase::VisitServer(const ContentDirectoryService &server,
|
||||
}
|
||||
}
|
||||
|
||||
gcc_const
|
||||
[[gnu::const]]
|
||||
static DatabaseSelection
|
||||
CheckSelection(DatabaseSelection selection) noexcept
|
||||
{
|
||||
|
Reference in New Issue
Block a user