Merge tag 'v0.20.9'

release v0.20.9
This commit is contained in:
Max Kellermann
2017-06-04 12:57:05 +02:00
69 changed files with 240 additions and 232 deletions

View File

@@ -29,7 +29,7 @@
struct StringLess {
gcc_pure
bool operator()(const char *a, const char *b) const {
bool operator()(const char *a, const char *b) const noexcept {
return strcmp(a, b) < 0;
}
};

View File

@@ -111,7 +111,6 @@ public:
TagType tag_type, TagMask group_mask,
VisitTag visit_tag) const = 0;
gcc_pure
virtual DatabaseStats GetStats(const DatabaseSelection &selection) const = 0;
/**
@@ -132,7 +131,7 @@ public:
* Returns a negative value if that is not not known/available.
*/
gcc_pure
virtual std::chrono::system_clock::time_point GetUpdateStamp() const = 0;
virtual std::chrono::system_clock::time_point GetUpdateStamp() const noexcept = 0;
};
#endif

View File

@@ -44,16 +44,16 @@ struct LightDirectory {
constexpr LightDirectory(const char *_uri, time_t _mtime)
:uri(_uri), mtime(_mtime) {}
static constexpr LightDirectory Root() {
static constexpr LightDirectory Root() noexcept {
return LightDirectory("", 0);
}
bool IsRoot() const {
bool IsRoot() const noexcept {
return *uri == 0;
}
gcc_pure
const char *GetPath() const {
const char *GetPath() const noexcept {
return uri;
}
};

View File

@@ -45,7 +45,7 @@ struct PlaylistInfo {
constexpr CompareName(const char *_name):name(_name) {}
gcc_pure
bool operator()(const PlaylistInfo &pi) const {
bool operator()(const PlaylistInfo &pi) const noexcept {
return pi.name.compare(name) == 0;
}
};

View File

@@ -128,7 +128,7 @@ public:
unsigned Update(const char *uri_utf8, bool discard) override;
std::chrono::system_clock::time_point GetUpdateStamp() const override {
std::chrono::system_clock::time_point GetUpdateStamp() const noexcept override {
return update_stamp;
}

View File

@@ -187,7 +187,7 @@ public:
}
gcc_pure
const char *GetPath() const {
const char *GetPath() const noexcept {
return path.c_str();
}

View File

@@ -76,7 +76,7 @@ public:
const ConfigBlock &block);
gcc_pure
Directory &GetRoot() {
Directory &GetRoot() noexcept {
assert(root != NULL);
return *root;
@@ -125,7 +125,7 @@ public:
DatabaseStats GetStats(const DatabaseSelection &selection) const override;
std::chrono::system_clock::time_point GetUpdateStamp() const override {
std::chrono::system_clock::time_point GetUpdateStamp() const noexcept override {
return mtime;
}

View File

@@ -60,7 +60,7 @@ public:
* Parent's ObjectId
*/
std::string parent_id;
std::string url;
/**
@@ -80,7 +80,7 @@ public:
UPnPDirObject &operator=(UPnPDirObject &&) = default;
void Clear() {
void Clear() noexcept {
id.clear();
parent_id.clear();
url.clear();
@@ -90,7 +90,7 @@ public:
}
gcc_pure
bool Check() const {
bool Check() const noexcept {
return !id.empty() && !parent_id.empty() && !name.empty() &&
(type != UPnPDirObject::Type::ITEM ||
item_class != UPnPDirObject::ItemClass::UNKNOWN);

View File

@@ -94,7 +94,7 @@ public:
DatabaseStats GetStats(const DatabaseSelection &selection) const override;
std::chrono::system_clock::time_point GetUpdateStamp() const override {
std::chrono::system_clock::time_point GetUpdateStamp() const noexcept override {
return std::chrono::system_clock::time_point::min();
}

View File

@@ -36,7 +36,7 @@
#include <string.h>
bool
ExcludeList::LoadFile(Path path_fs)
ExcludeList::LoadFile(Path path_fs) noexcept
try {
#ifdef HAVE_CLASS_GLOB
TextFile file(path_fs);
@@ -67,7 +67,7 @@ try {
}
bool
ExcludeList::Check(Path name_fs) const
ExcludeList::Check(Path name_fs) const noexcept
{
assert(!name_fs.IsNull());

View File

@@ -50,7 +50,7 @@ public:
:parent(&_parent) {}
gcc_pure
bool IsEmpty() const {
bool IsEmpty() const noexcept {
#ifdef HAVE_CLASS_GLOB
return ((parent == nullptr) || parent->IsEmpty()) && patterns.empty();
#else
@@ -62,13 +62,13 @@ public:
/**
* Loads and parses a .mpdignore file.
*/
bool LoadFile(Path path_fs);
bool LoadFile(Path path_fs) noexcept;
/**
* Checks whether one of the patterns in the .mpdignore file matches
* the specified file name.
*/
bool Check(Path name_fs) const;
bool Check(Path name_fs) const noexcept;
};