fmt, mpd.
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
From 3f2f3251cba7b9193f39027e204ea5e3248cbb7a Mon Sep 17 00:00:00 2001
|
||||
From: Max Kellermann <max@musicpd.org>
|
||||
Date: Fri, 15 Oct 2021 09:39:23 +0200
|
||||
Subject: [PATCH] neighbor/smbclient: use [[gnu::pure]]
|
||||
|
||||
Fixes part 1 of https://github.com/MusicPlayerDaemon/MPD/issues/1279
|
||||
---
|
||||
src/neighbor/plugins/SmbclientNeighborPlugin.cxx | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/neighbor/plugins/SmbclientNeighborPlugin.cxx b/src/neighbor/plugins/SmbclientNeighborPlugin.cxx
|
||||
index f759e4e756..97e40e941c 100644
|
||||
--- a/src/neighbor/plugins/SmbclientNeighborPlugin.cxx
|
||||
+++ b/src/neighbor/plugins/SmbclientNeighborPlugin.cxx
|
||||
@@ -45,12 +45,12 @@ class SmbclientNeighborExplorer final : public NeighborExplorer {
|
||||
|
||||
Server(const Server &) = delete;
|
||||
|
||||
- gcc_pure
|
||||
+ [[gnu::pure]]
|
||||
bool operator==(const Server &other) const noexcept {
|
||||
return name == other.name;
|
||||
}
|
||||
|
||||
- [[nodiscard]] gcc_pure
|
||||
+ [[nodiscard]] [[gnu::pure]]
|
||||
NeighborInfo Export() const noexcept {
|
||||
return { "smb://" + name + "/", comment };
|
||||
}
|
||||
@@ -169,7 +169,7 @@ ReadServers(SmbclientContext &ctx, const char *uri,
|
||||
uri);
|
||||
}
|
||||
|
||||
-gcc_pure
|
||||
+[[gnu::pure]]
|
||||
static NeighborExplorer::List
|
||||
DetectServers(SmbclientContext &ctx) noexcept
|
||||
{
|
||||
@@ -178,7 +178,7 @@ DetectServers(SmbclientContext &ctx) noexcept
|
||||
return list;
|
||||
}
|
||||
|
||||
-gcc_pure
|
||||
+[[gnu::pure]]
|
||||
static NeighborExplorer::List::iterator
|
||||
FindBeforeServerByURI(NeighborExplorer::List::iterator prev,
|
||||
NeighborExplorer::List::iterator end,
|
||||
Reference in New Issue
Block a user