net: flag relevant Sock methods with [[nodiscard]]

This commit is contained in:
Vasil Dimov
2021-04-08 16:37:54 +02:00
parent a1f0b8b62e
commit e286cd0d7b
4 changed files with 21 additions and 18 deletions

View File

@@ -179,7 +179,7 @@ void Sock::SendComplete(const std::string& data,
// Wait for a short while (or the socket to become ready for sending) before retrying
// if nothing was sent.
const auto wait_time = std::min(deadline - now, std::chrono::milliseconds{MAX_WAIT_FOR_IO});
Wait(wait_time, SEND);
(void)Wait(wait_time, SEND);
}
}
@@ -262,7 +262,7 @@ std::string Sock::RecvUntilTerminator(uint8_t terminator,
// Wait for a short while (or the socket to become ready for reading) before retrying.
const auto wait_time = std::min(deadline - now, std::chrono::milliseconds{MAX_WAIT_FOR_IO});
Wait(wait_time, RECV);
(void)Wait(wait_time, RECV);
}
}