Pad hidl_pointer in all cases.
Test: fixes VtsHalAudioV2_0TargetProfiling
Bug: 65860534
Change-Id: Ia356774e1ed47a653866eeb6ad42239207db77c9
diff --git a/base/include/hidl/HidlInternal.h b/base/include/hidl/HidlInternal.h
index e9c628b..7a8019d 100644
--- a/base/include/hidl/HidlInternal.h
+++ b/base/include/hidl/HidlInternal.h
@@ -56,15 +56,9 @@
hidl_pointer()
: _pad(0) {
}
- hidl_pointer(T* ptr)
- : mPointer(ptr) {
- }
- hidl_pointer(const hidl_pointer<T>& other) {
- mPointer = other.mPointer;
- }
- hidl_pointer(hidl_pointer<T>&& other) {
- *this = std::move(other);
- }
+ hidl_pointer(T* ptr) : hidl_pointer() { mPointer = ptr; }
+ hidl_pointer(const hidl_pointer<T>& other) : hidl_pointer() { mPointer = other.mPointer; }
+ hidl_pointer(hidl_pointer<T>&& other) : hidl_pointer() { *this = std::move(other); }
hidl_pointer &operator=(const hidl_pointer<T>& other) {
mPointer = other.mPointer;