[clang-tidy] use nodiscard
Introduced in C++17. It replaces gcc's warn_unused_result. Found with modernize-use-nodiscard. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
@@ -50,7 +50,7 @@ class SmbclientNeighborExplorer final : public NeighborExplorer {
|
||||
return name == other.name;
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
[[nodiscard]] gcc_pure
|
||||
NeighborInfo Export() const noexcept {
|
||||
return { "smb://" + name + "/", comment };
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ class UpnpNeighborExplorer final
|
||||
return name == other.name;
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
[[nodiscard]] gcc_pure
|
||||
NeighborInfo Export() const noexcept {
|
||||
return { "smb://" + name + "/", comment };
|
||||
}
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
/* virtual methods from class NeighborExplorer */
|
||||
void Open() override;
|
||||
void Close() noexcept override;
|
||||
List GetList() const noexcept override;
|
||||
[[nodiscard]] List GetList() const noexcept override;
|
||||
|
||||
private:
|
||||
/* virtual methods from class UPnPDiscoveryListener */
|
||||
|
||||
Reference in New Issue
Block a user