diff --git a/include/scl/math/array.h b/include/scl/math/array.h index 6cbf53f..667de38 100644 --- a/include/scl/math/array.h +++ b/include/scl/math/array.h @@ -135,7 +135,7 @@ class Array final { * This function will attempt to construct a \p T element using \p value, and * then fill all slots with this value. */ - explicit Array(int value) : Array(T{value}) {}; + explicit Array(int value) : Array(T{value}) {} /** * @brief Copy construct an Array from another array. diff --git a/include/scl/net/tcp_channel.h b/include/scl/net/tcp_channel.h index 6183a11..e6dd72e 100644 --- a/include/scl/net/tcp_channel.h +++ b/include/scl/net/tcp_channel.h @@ -151,10 +151,10 @@ coro::Task TcpChannel::send(const Packet& packet) { } else { throw std::system_error(err, std::generic_category(), "send failed"); } + } else { + rem -= written; + data += written; } - - rem -= written; - data += written; } } @@ -178,10 +178,10 @@ coro::Task recvInto(SocketType socket, } else { throw std::system_error(err, std::generic_category(), "recv failed"); } + } else { + rem -= read; + dst += read; } - - rem -= read; - dst += read; } }