OSDN Git Service

Add explicit default copy constructor
authorYi Kong <yikong@google.com>
Wed, 10 May 2017 21:27:39 +0000 (14:27 -0700)
committerYi Kong <yikong@google.com>
Wed, 10 May 2017 21:27:39 +0000 (14:27 -0700)
Definition of implicit copy constructor is deprecated if it has a
user-declared destructor. This triggers -Wdeprecated compiler warning
and breaks the build in latest Clang update.

Test: Build
Bug: 37752547
Change-Id: I467d5ff3b4cca4644c7ec8c99ae35556029ce509

include/binder/Parcelable.h

index d5b57ac..a9166e2 100644 (file)
@@ -36,6 +36,9 @@ class Parcelable {
 public:
     virtual ~Parcelable() = default;
 
+    Parcelable() = default;
+    Parcelable(const Parcelable&) = default;
+
     // Write |this| parcelable to the given |parcel|.  Keep in mind that
     // implementations of writeToParcel must be manually kept in sync
     // with readFromParcel and the Java equivalent versions of these methods.