Commit c833e4b0 authored by Jakob Otto's avatar Jakob Otto

Fix const specifiers

parent cdde5579
...@@ -90,7 +90,7 @@ public: ...@@ -90,7 +90,7 @@ public:
if (write_buf_.empty()) if (write_buf_.empty())
return false; return false;
auto len = write_buf_.size() - written_; auto len = write_buf_.size() - written_;
void* buf = write_buf_.data() + written_; const void* buf = write_buf_.data() + written_;
CAF_LOG_TRACE(CAF_ARG(handle_.id) << CAF_ARG(len)); CAF_LOG_TRACE(CAF_ARG(handle_.id) << CAF_ARG(len));
auto ret = net::write(handle_, buf, len); auto ret = net::write(handle_, buf, len);
if (auto num_bytes = get_if<size_t>(&ret)) { if (auto num_bytes = get_if<size_t>(&ret)) {
...@@ -130,7 +130,7 @@ public: ...@@ -130,7 +130,7 @@ public:
void configure_read(net::receive_policy::config cfg); void configure_read(net::receive_policy::config cfg);
void write_packet(span<byte> buf); void write_packet(span<const byte> buf);
private: private:
net::stream_socket handle_; net::stream_socket handle_;
......
...@@ -69,7 +69,7 @@ void scribe::configure_read(net::receive_policy::config cfg) { ...@@ -69,7 +69,7 @@ void scribe::configure_read(net::receive_policy::config cfg) {
prepare_next_read(); prepare_next_read();
} }
void scribe::write_packet(const span<byte> buf) { void scribe::write_packet(span<const byte> buf) {
write_buf_.insert(write_buf_.end(), buf.begin(), buf.end()); write_buf_.insert(write_buf_.end(), buf.begin(), buf.end());
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment