more [[gnu::...]] attributes
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
/* this destructor exists here just so it won't get inlined */
|
||||
UPnPDirContent::~UPnPDirContent() = default;
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
static UPnPDirObject::ItemClass
|
||||
ParseItemClass(StringView name) noexcept
|
||||
{
|
||||
@@ -45,7 +45,7 @@ ParseItemClass(StringView name) noexcept
|
||||
return UPnPDirObject::ItemClass::UNKNOWN;
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
static SignedSongTime
|
||||
ParseDuration(const char *duration) noexcept
|
||||
{
|
||||
@@ -73,7 +73,7 @@ ParseDuration(const char *duration) noexcept
|
||||
* elements. There is a very slight risk of collision in doing
|
||||
* this. Twonky returns directory names (titles) like 'Artist/Album'.
|
||||
*/
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
static std::string &&
|
||||
TitleToPathSegment(std::string &&s) noexcept
|
||||
{
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#define MPD_UPNP_DIRECTORY_HXX
|
||||
|
||||
#include "Object.hxx"
|
||||
#include "util/Compiler.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -39,7 +38,7 @@ public:
|
||||
|
||||
~UPnPDirContent();
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
UPnPDirObject *FindObject(std::string_view name) noexcept {
|
||||
for (auto &o : objects)
|
||||
if (o.name == name)
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#define MPD_UPNP_OBJECT_HXX
|
||||
|
||||
#include "tag/Tag.hxx"
|
||||
#include "util/Compiler.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
@@ -89,12 +88,12 @@ public:
|
||||
tag.Clear();
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
bool IsRoot() const noexcept {
|
||||
return type == Type::CONTAINER && id == "0";
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
bool Check() const noexcept {
|
||||
return !id.empty() &&
|
||||
/* root nodes don't need a parent id and a
|
||||
|
||||
Reference in New Issue
Block a user