diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2021-12-11 04:55:46 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-12-11 04:55:46 +0000 |
commit | 22082f2d949a4b08d807884e69c097b7db3a5748 (patch) | |
tree | 47b022bee14276b3206fe0685b958c60ba2336a9 | |
parent | 3e9f19c762fb9ecf5bcdc854a03737f415fa4621 (diff) | |
parent | 889451ed46c40eb11ac5942197c551bee2bf3ef9 (diff) | |
download | native-22082f2d949a4b08d807884e69c097b7db3a5748.tar.gz |
Merge "libbinder_ndk: do not rely on copyability of parcelables"
-rw-r--r-- | libs/binder/ndk/include_cpp/android/binder_parcel_utils.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/binder/ndk/include_cpp/android/binder_parcel_utils.h b/libs/binder/ndk/include_cpp/android/binder_parcel_utils.h index 67623a6556..c1487c0bd2 100644 --- a/libs/binder/ndk/include_cpp/android/binder_parcel_utils.h +++ b/libs/binder/ndk/include_cpp/android/binder_parcel_utils.h @@ -560,7 +560,7 @@ static inline binder_status_t AParcel_readNullableParcelable(const AParcel* parc *p = std::nullopt; return STATUS_OK; } - *p = std::optional<first_template_type_t<P>>(first_template_type_t<P>{}); + p->emplace(first_template_type_t<P>()); return (*p)->readFromParcel(parcel); } else { static_assert(is_specialization_v<P, std::unique_ptr>); |