Add explicit copy assignment operator for NotifyMotionArgs.
Right now we rely on an implicit definition of this operator, which is
deprecated since we have an explicit copy constructor. See
-Wdeprecated-copy-with-user-provided-copy for details on why this isn't
desirable. Fortunately, a default implementation of the copy assignment
operator is sufficient, so there's no actual bug in the current usages.
Test: atest NotifyArgs_Test.cpp
Change-Id: I58a913ad1c37414e86167557fdd4deb29499f432
diff --git a/services/inputflinger/include/NotifyArgs.h b/services/inputflinger/include/NotifyArgs.h
index f28dbf3..c46f905 100644
--- a/services/inputflinger/include/NotifyArgs.h
+++ b/services/inputflinger/include/NotifyArgs.h
@@ -116,6 +116,8 @@
NotifyMotionArgs(const NotifyMotionArgs& other);
+ NotifyMotionArgs& operator=(const android::NotifyMotionArgs&) = default;
+
bool operator==(const NotifyMotionArgs& rhs) const;
std::string dump() const;