Remove PointerProperties::copyFrom
Remove copyFrom in favor of default-generated operator=.
Bug: 271455682
Test: m checkinput
Change-Id: Ie00d027bcbf0a994e04e6b79a107c32077c3a3d8
diff --git a/services/inputflinger/dispatcher/Entry.cpp b/services/inputflinger/dispatcher/Entry.cpp
index a670ebe..a0f0dcb 100644
--- a/services/inputflinger/dispatcher/Entry.cpp
+++ b/services/inputflinger/dispatcher/Entry.cpp
@@ -235,8 +235,8 @@
downTime(downTime),
pointerCount(pointerCount) {
for (uint32_t i = 0; i < pointerCount; i++) {
- this->pointerProperties[i].copyFrom(pointerProperties[i]);
- this->pointerCoords[i].copyFrom(pointerCoords[i]);
+ this->pointerProperties[i] = pointerProperties[i];
+ this->pointerCoords[i] = pointerCoords[i];
}
}
diff --git a/services/inputflinger/dispatcher/InputDispatcher.cpp b/services/inputflinger/dispatcher/InputDispatcher.cpp
index abb0610..1d9c5b4 100644
--- a/services/inputflinger/dispatcher/InputDispatcher.cpp
+++ b/services/inputflinger/dispatcher/InputDispatcher.cpp
@@ -4093,9 +4093,9 @@
uint32_t pointerId = uint32_t(pointerProperties.id);
if (pointerIds.test(pointerId)) {
splitPointerIndexMap[splitPointerCount] = originalPointerIndex;
- splitPointerProperties[splitPointerCount].copyFrom(pointerProperties);
- splitPointerCoords[splitPointerCount].copyFrom(
- originalMotionEntry.pointerCoords[originalPointerIndex]);
+ splitPointerProperties[splitPointerCount] = pointerProperties;
+ splitPointerCoords[splitPointerCount] =
+ originalMotionEntry.pointerCoords[originalPointerIndex];
splitPointerCount += 1;
}
}
diff --git a/services/inputflinger/dispatcher/InputState.cpp b/services/inputflinger/dispatcher/InputState.cpp
index 2fcb89a..fe0b89c 100644
--- a/services/inputflinger/dispatcher/InputState.cpp
+++ b/services/inputflinger/dispatcher/InputState.cpp
@@ -240,8 +240,8 @@
continue;
}
}
- pointerProperties[pointerCount].copyFrom(entry.pointerProperties[i]);
- pointerCoords[pointerCount].copyFrom(entry.pointerCoords[i]);
+ pointerProperties[pointerCount] = entry.pointerProperties[i];
+ pointerCoords[pointerCount] = entry.pointerCoords[i];
pointerCount++;
}
}
@@ -251,8 +251,8 @@
if (other.firstNewPointerIdx < 0) {
other.firstNewPointerIdx = other.pointerCount;
}
- other.pointerProperties[other.pointerCount].copyFrom(pointerProperties[i]);
- other.pointerCoords[other.pointerCount].copyFrom(pointerCoords[i]);
+ other.pointerProperties[other.pointerCount] = pointerProperties[i];
+ other.pointerCoords[other.pointerCount] = pointerCoords[i];
other.pointerCount++;
}
}
@@ -324,17 +324,16 @@
// We will deliver all pointers the target already knows about
for (uint32_t i = 0; i < static_cast<uint32_t>(memento.firstNewPointerIdx); i++) {
- pointerProperties[i].copyFrom(memento.pointerProperties[i]);
- pointerCoords[i].copyFrom(memento.pointerCoords[i]);
+ pointerProperties[i] = memento.pointerProperties[i];
+ pointerCoords[i] = memento.pointerCoords[i];
pointerCount++;
}
// We will send explicit events for all pointers the target doesn't know about
for (uint32_t i = static_cast<uint32_t>(memento.firstNewPointerIdx);
i < memento.pointerCount; i++) {
-
- pointerProperties[i].copyFrom(memento.pointerProperties[i]);
- pointerCoords[i].copyFrom(memento.pointerCoords[i]);
+ pointerProperties[i] = memento.pointerProperties[i];
+ pointerCoords[i] = memento.pointerCoords[i];
pointerCount++;
// Down only if the first pointer, pointer down otherwise
@@ -370,8 +369,8 @@
std::vector<PointerCoords> pointerCoords(MAX_POINTERS);
for (uint32_t pointerIdx = 0; pointerIdx < memento.pointerCount; pointerIdx++) {
uint32_t pointerId = uint32_t(memento.pointerProperties[pointerIdx].id);
- pointerProperties[pointerIdx].copyFrom(memento.pointerProperties[pointerIdx]);
- pointerCoords[pointerIdx].copyFrom(memento.pointerCoords[pointerIdx]);
+ pointerProperties[pointerIdx] = memento.pointerProperties[pointerIdx];
+ pointerCoords[pointerIdx] = memento.pointerCoords[pointerIdx];
if (pointerIds.test(pointerId)) {
canceledPointerIndices.push_back(pointerIdx);
}