fix #888 omit unnecessary sizeof() for char*

This commit is contained in:
Ulrich Lukas
2020-11-18 11:55:28 +01:00
committed by Ulrich Lukas
parent 8012f6e9eb
commit d4bdf996c8

View File

@@ -144,7 +144,7 @@ size_t AsyncEventSourceMessage::send(AsyncClient *client) {
return 0;
}
const size_t len_to_send = _len - _sent;
auto position = reinterpret_cast<const char*>(_data + _sent * sizeof(*_data));
auto position = reinterpret_cast<const char*>(_data + _sent);
const size_t sent_now = client->write(position, len_to_send);
_sent += sent_now;
return sent_now;