use [[gnu::...]] attributes
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
#include "fs/FileInfo.hxx"
|
||||
#include "fs/Traits.hxx"
|
||||
#include "thread/Mutex.hxx"
|
||||
#include "util/Compiler.h"
|
||||
#include "Log.hxx"
|
||||
|
||||
#include <cassert>
|
||||
@@ -61,10 +60,10 @@ struct WatchDirectory {
|
||||
|
||||
void LoadExcludeList(Path directory_path) noexcept;
|
||||
|
||||
[[nodiscard]] gcc_pure
|
||||
[[nodiscard]] [[gnu::pure]]
|
||||
unsigned GetDepth() const noexcept;
|
||||
|
||||
[[nodiscard]] gcc_pure
|
||||
[[nodiscard]] [[gnu::pure]]
|
||||
AllocatedPath GetUriFS() const noexcept;
|
||||
};
|
||||
|
||||
@@ -137,7 +136,7 @@ WatchDirectory::GetUriFS() const noexcept
|
||||
}
|
||||
|
||||
/* we don't look at "." / ".." nor files with newlines in their name */
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
static bool
|
||||
SkipFilename(Path name) noexcept
|
||||
{
|
||||
@@ -210,7 +209,7 @@ try {
|
||||
LogError(std::current_exception());
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
unsigned
|
||||
WatchDirectory::GetDepth() const noexcept
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "playlist/PlaylistRegistry.hxx"
|
||||
#include "fs/Traits.hxx"
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
static bool
|
||||
HaveArchivePluginForFilename(const char *filename) noexcept
|
||||
{
|
||||
@@ -21,7 +21,7 @@ HaveArchivePluginForFilename(const char *filename) noexcept
|
||||
#endif
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
static bool
|
||||
HaveContainerPluginForFilename(const char *filename) noexcept
|
||||
{
|
||||
@@ -31,7 +31,7 @@ HaveContainerPluginForFilename(const char *filename) noexcept
|
||||
decoder_plugins_supports_suffix(suffix);
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
static bool
|
||||
HavePlaylistPluginForFilename(const char *filename) noexcept
|
||||
{
|
||||
|
||||
@@ -215,14 +215,14 @@ try {
|
||||
}
|
||||
|
||||
/* we don't look at files with newlines in their name */
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
static bool
|
||||
skip_path(const char *name_utf8) noexcept
|
||||
{
|
||||
return std::strchr(name_utf8, '\n') != nullptr;
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
bool
|
||||
UpdateWalk::SkipSymlink(const Directory *directory,
|
||||
std::string_view utf8_name) const noexcept
|
||||
|
||||
Reference in New Issue
Block a user