From bdf2f5d539ffbd43a96ca3b23dcf85cbeec88ed5 Mon Sep 17 00:00:00 2001 From: liubb_0516 Date: Wed, 18 May 2022 20:17:34 +0800 Subject: [PATCH] ipc:add new interface of MessageParcelAppend Signed-off-by: liubb_0516 --- base/include/parcel.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/base/include/parcel.h b/base/include/parcel.h index 75758eb..b69981f 100644 --- a/base/include/parcel.h +++ b/base/include/parcel.h @@ -299,8 +299,7 @@ public: bool ReadUint16Unaligned(uint16_t &value); bool EnsureObjectsCapacity(); - - bool WriteParcelableOffset(size_t offset); + bool WriteObjectOffset(binder_size_t offset); private: DISALLOW_COPY_AND_MOVE(Parcel); @@ -322,8 +321,6 @@ private: return (((size + SIZE_OFFSET) & (~SIZE_OFFSET)) - size); } - bool WriteObjectOffset(binder_size_t offset); - size_t CalcNewCapacity(size_t minCapacity); bool WriteDataBytes(const void *data, size_t size); @@ -332,6 +329,8 @@ private: bool EnsureWritableCapacity(size_t desireCapacity); + bool WriteParcelableOffset(size_t offset); + private: uint8_t *data_; size_t readCursor_;