Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95c48ed4 authored by Paul Liétar's avatar Paul Liétar Committed by Android (Google) Code Review
Browse files

Merge "binder: Replace use of resize()/memcpy() with reserve()/insert()"

parents 13a20cd5 433e87b2
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1427,13 +1427,13 @@ status_t readByteVectorInternal(const Parcel* parcel,
        return status;
    }

    const void* data = parcel->readInplace(size);
    T* data = const_cast<T*>(reinterpret_cast<const T*>(parcel->readInplace(size)));
    if (!data) {
        status = BAD_VALUE;
        return status;
    }
    val->resize(size);
    memcpy(val->data(), data, size);
    val->reserve(size);
    val->insert(val->end(), data, data + size);

    return status;
}