1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:17:45 +00:00

AK: Remove unnecessary casts to size_t, after Vector changes

Now that Vector uses size_t, we can remove a whole bunch of redundant
casts to size_t.
This commit is contained in:
Andreas Kling 2020-03-01 12:35:09 +01:00
parent fee20bd8de
commit 22d0a6d92f
15 changed files with 60 additions and 57 deletions

View file

@ -121,7 +121,7 @@ public:
bool post_message(const Message& message)
{
auto buffer = message.encode();
int nwritten = write(m_connection->fd(), buffer.data(), (size_t)buffer.size());
int nwritten = write(m_connection->fd(), buffer.data(), buffer.size());
if (nwritten < 0) {
perror("write");
ASSERT_NOT_REACHED();
@ -165,7 +165,7 @@ private:
}
size_t decoded_bytes = 0;
for (size_t index = 0; index < (size_t)bytes.size(); index += decoded_bytes) {
for (size_t index = 0; index < bytes.size(); index += decoded_bytes) {
auto remaining_bytes = ByteBuffer::wrap(bytes.data() + index, bytes.size() - index);
if (auto message = LocalEndpoint::decode_message(remaining_bytes, decoded_bytes)) {
m_unprocessed_messages.append(move(message));