[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:
@@ -77,7 +77,7 @@ public:
|
||||
Close();
|
||||
}
|
||||
|
||||
unsigned GetSerial() const noexcept {
|
||||
[[nodiscard]] unsigned GetSerial() const noexcept {
|
||||
return serial;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
using SocketMonitor::IsDefined;
|
||||
using SocketMonitor::Close;
|
||||
|
||||
gcc_pure
|
||||
[[nodiscard]] gcc_pure
|
||||
std::string ToString() const noexcept {
|
||||
return ::ToString(address);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user