void QueryParcelable::WriteToParcel(tizen_base::Parcel* parcel) const {
AbstractParcelable::WriteToParcel(parcel);
- WriteString(parcel, query_.c_str());
+ parcel->WriteString(query_);
WriteInt(parcel, db_type_);
WriteInt(parcel, op_type_);
}
void QueryParcelable::ReadFromParcel(tizen_base::Parcel* parcel) {
- char *query = nullptr;
int op_type = 0;
int db_type = 0;
AbstractParcelable::ReadFromParcel(parcel);
- ReadString(parcel, &query);
- query_ = query;
- free(query);
+ query_ = parcel->ReadString();
ReadInt(parcel, &db_type);
db_type_ = static_cast<AbstractDBHandler::DBType>(db_type);
ReadInt(parcel, &op_type);