Made some member functions const where appropriate.

This commit is contained in:
Gavin Smith 2025-04-03 00:17:26 +01:00
commit 2469d730b1
2 changed files with 5 additions and 5 deletions

View file

@ -72,11 +72,11 @@ namespace SimpleWeb {
friend class ClientBase<socket_type>;
public:
std::size_t size() noexcept {
std::size_t size() const noexcept {
return streambuf.size();
}
/// Convenience function to return content as a string.
std::string string() noexcept {
std::string string() const noexcept {
return std::string(asio::buffers_begin(streambuf.data()), asio::buffers_end(streambuf.data()));
}

View file

@ -135,7 +135,7 @@ namespace SimpleWeb {
}
public:
std::size_t size() noexcept {
std::size_t size() const noexcept {
return streambuf->size();
}
@ -209,11 +209,11 @@ namespace SimpleWeb {
friend class ServerBase<socket_type>;
public:
std::size_t size() noexcept {
std::size_t size() const noexcept {
return streambuf.size();
}
/// Convenience function to return content as std::string.
std::string string() noexcept {
std::string string() const noexcept {
return std::string(asio::buffers_begin(streambuf.data()), asio::buffers_end(streambuf.data()));
}