[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:
@@ -169,7 +169,7 @@ struct DavResponse {
|
||||
std::chrono::system_clock::time_point::min();
|
||||
uint64_t length = 0;
|
||||
|
||||
bool Check() const {
|
||||
[[nodiscard]] bool Check() const {
|
||||
return !href.empty();
|
||||
}
|
||||
};
|
||||
|
@@ -129,7 +129,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
EventLoop &GetEventLoop() const noexcept {
|
||||
[[nodiscard]] EventLoop &GetEventLoop() const noexcept {
|
||||
return defer_connect.GetEventLoop();
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ public:
|
||||
:BlockingNfsOperation(_connection), path(_path),
|
||||
follow(_follow) {}
|
||||
|
||||
const StorageFileInfo &GetInfo() const {
|
||||
[[nodiscard]] const StorageFileInfo &GetInfo() const {
|
||||
return info;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user