Merge branch 'add_const_member_functions' into 'master'
Made some member functions const where appropriate. See merge request eidheim/Simple-Web-Server!282
This commit is contained in:
commit
187f798d54
2 changed files with 5 additions and 5 deletions
|
|
@ -72,11 +72,11 @@ namespace SimpleWeb {
|
||||||
friend class ClientBase<socket_type>;
|
friend class ClientBase<socket_type>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
std::size_t size() noexcept {
|
std::size_t size() const noexcept {
|
||||||
return streambuf.size();
|
return streambuf.size();
|
||||||
}
|
}
|
||||||
/// Convenience function to return content as a string.
|
/// 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()));
|
return std::string(asio::buffers_begin(streambuf.data()), asio::buffers_end(streambuf.data()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,7 @@ namespace SimpleWeb {
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
std::size_t size() noexcept {
|
std::size_t size() const noexcept {
|
||||||
return streambuf->size();
|
return streambuf->size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -209,11 +209,11 @@ namespace SimpleWeb {
|
||||||
friend class ServerBase<socket_type>;
|
friend class ServerBase<socket_type>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
std::size_t size() noexcept {
|
std::size_t size() const noexcept {
|
||||||
return streambuf.size();
|
return streambuf.size();
|
||||||
}
|
}
|
||||||
/// Convenience function to return content as std::string.
|
/// 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()));
|
return std::string(asio::buffers_begin(streambuf.data()), asio::buffers_end(streambuf.data()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue