auto& raw_values = key_info->GetValues();
unsigned char* bytes = nullptr;
- if (!raw_values.empty())
+ size_t size = 0;
+ if (!raw_values.empty()) {
bytes = reinterpret_cast<unsigned char*>(raw_values[0].get());
- auto size = reinterpret_cast<size_t>(key_info->GetValuesSize()[0]);
+ size = reinterpret_cast<size_t>(key_info->GetValuesSize()[0]);
+ }
return std::vector<unsigned char>(bytes, bytes + size);
}
data_ = static_cast<uint8_t*>(malloc(data_capacity_));
}
-Parcel::Impl::Impl(Parcel* parent, uint8_t* start_pos, size_t data_size) {
- data_ = start_pos;
- data_capacity_ = data_size;
- data_size_ = 0;
- ownership_ = false;
- pin_ = true;
-}
+Parcel::Impl::Impl(Parcel* parent, uint8_t* start_pos, size_t data_size)
+ : parent_(parent), data_capacity_(data_size), data_size_(0),
+ data_(start_pos), ownership_(false), pin_(true) {}
Parcel::Impl::~Impl() {
if (ownership_) free(data_);