Commit 3f2f3251 authored by Max Kellermann's avatar Max Kellermann

neighbor/smbclient: use [[gnu::pure]]

parent 8ae85f39
...@@ -45,12 +45,12 @@ class SmbclientNeighborExplorer final : public NeighborExplorer { ...@@ -45,12 +45,12 @@ class SmbclientNeighborExplorer final : public NeighborExplorer {
Server(const Server &) = delete; Server(const Server &) = delete;
gcc_pure [[gnu::pure]]
bool operator==(const Server &other) const noexcept { bool operator==(const Server &other) const noexcept {
return name == other.name; return name == other.name;
} }
[[nodiscard]] gcc_pure [[nodiscard]] [[gnu::pure]]
NeighborInfo Export() const noexcept { NeighborInfo Export() const noexcept {
return { "smb://" + name + "/", comment }; return { "smb://" + name + "/", comment };
} }
...@@ -169,7 +169,7 @@ ReadServers(SmbclientContext &ctx, const char *uri, ...@@ -169,7 +169,7 @@ ReadServers(SmbclientContext &ctx, const char *uri,
uri); uri);
} }
gcc_pure [[gnu::pure]]
static NeighborExplorer::List static NeighborExplorer::List
DetectServers(SmbclientContext &ctx) noexcept DetectServers(SmbclientContext &ctx) noexcept
{ {
...@@ -178,7 +178,7 @@ DetectServers(SmbclientContext &ctx) noexcept ...@@ -178,7 +178,7 @@ DetectServers(SmbclientContext &ctx) noexcept
return list; return list;
} }
gcc_pure [[gnu::pure]]
static NeighborExplorer::List::iterator static NeighborExplorer::List::iterator
FindBeforeServerByURI(NeighborExplorer::List::iterator prev, FindBeforeServerByURI(NeighborExplorer::List::iterator prev,
NeighborExplorer::List::iterator end, NeighborExplorer::List::iterator end,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment