more [[gnu::...]] attributes
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
#ifndef MPD_EXCLUDE_H
|
||||
#define MPD_EXCLUDE_H
|
||||
|
||||
#include "util/Compiler.h"
|
||||
#include "fs/Glob.hxx"
|
||||
#include "input/Ptr.hxx"
|
||||
#include "config.h"
|
||||
@@ -50,7 +49,7 @@ public:
|
||||
ExcludeList(const ExcludeList &_parent) noexcept
|
||||
:parent(&_parent) {}
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
bool IsEmpty() const noexcept {
|
||||
#ifdef HAVE_CLASS_GLOB
|
||||
return ((parent == nullptr) || parent->IsEmpty()) && patterns.empty();
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
#ifndef MPD_UPDATE_QUEUE_HXX
|
||||
#define MPD_UPDATE_QUEUE_HXX
|
||||
|
||||
#include "util/Compiler.h"
|
||||
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <list>
|
||||
@@ -61,7 +59,6 @@ class UpdateQueue {
|
||||
std::list<UpdateQueueItem> update_queue;
|
||||
|
||||
public:
|
||||
gcc_nonnull_all
|
||||
bool Push(SimpleDatabase &db, Storage &storage,
|
||||
std::string_view path, bool discard, unsigned id) noexcept;
|
||||
|
||||
@@ -71,10 +68,8 @@ public:
|
||||
update_queue.clear();
|
||||
}
|
||||
|
||||
gcc_nonnull_all
|
||||
void Erase(SimpleDatabase &db) noexcept;
|
||||
|
||||
gcc_nonnull_all
|
||||
void Erase(Storage &storage) noexcept;
|
||||
};
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "Queue.hxx"
|
||||
#include "event/InjectEvent.hxx"
|
||||
#include "thread/Thread.hxx"
|
||||
#include "util/Compiler.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
@@ -90,7 +89,6 @@ public:
|
||||
* the whole music directory is updated
|
||||
* @return the job id
|
||||
*/
|
||||
gcc_nonnull_all
|
||||
unsigned Enqueue(std::string_view path, bool discard);
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
#ifndef MPD_UPDATE_IO_HXX
|
||||
#define MPD_UPDATE_IO_HXX
|
||||
|
||||
#include "util/Compiler.h"
|
||||
|
||||
#include <string_view>
|
||||
|
||||
struct Directory;
|
||||
@@ -43,11 +41,11 @@ GetInfo(Storage &storage, const char *uri_utf8, StorageFileInfo &info) noexcept;
|
||||
bool
|
||||
GetInfo(StorageDirectoryReader &reader, StorageFileInfo &info) noexcept;
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
bool
|
||||
DirectoryExists(Storage &storage, const Directory &directory) noexcept;
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
bool
|
||||
directory_child_is_regular(Storage &storage, const Directory &directory,
|
||||
std::string_view name_utf8) noexcept;
|
||||
@@ -55,7 +53,7 @@ directory_child_is_regular(Storage &storage, const Directory &directory,
|
||||
/**
|
||||
* Checks if the given permissions on the mapped file are given.
|
||||
*/
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
bool
|
||||
directory_child_access(Storage &storage, const Directory &directory,
|
||||
std::string_view name, int mode) noexcept;
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
#include "Config.hxx"
|
||||
#include "Editor.hxx"
|
||||
#include "util/Compiler.h"
|
||||
#include "config.h"
|
||||
|
||||
#include <atomic>
|
||||
@@ -76,7 +75,7 @@ public:
|
||||
bool Walk(Directory &root, const char *path, bool discard) noexcept;
|
||||
|
||||
private:
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
bool SkipSymlink(const Directory *directory,
|
||||
std::string_view utf8_name) const noexcept;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user