summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kaiser <gkaiser@google.com>2022-01-18 15:00:30 -0800
committerGreg Kaiser <gkaiser@google.com>2022-01-18 15:00:30 -0800
commit5cb52553df9d09a87d46d0655cf889b63d002797 (patch)
tree4e24a0a66f551722b0de3fd3599efa7ce3a1db48
parent27178421050682d91f1da59a96092cbea673a547 (diff)
Fix copy() using iterators from different containers
We fix up a std::copy that was using the wrong container for the end(). Test: TreeHugger Bug: 206867060 Change-Id: I5b7700029db6a513b6fdf03c3449be973d639df5
-rw-r--r--sensors/aidl/default/multihal/ConvertUtils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/sensors/aidl/default/multihal/ConvertUtils.cpp b/sensors/aidl/default/multihal/ConvertUtils.cpp
index 4d6697be3e..509bbb0e7b 100644
--- a/sensors/aidl/default/multihal/ConvertUtils.cpp
+++ b/sensors/aidl/default/multihal/ConvertUtils.cpp
@@ -131,7 +131,7 @@ void convertToHidlEvent(const AidlEvent& aidlEvent, V2_1Event* hidlEvent) {
break;
case AidlSensorType::POSE_6DOF:
std::copy(std::begin(aidlEvent.payload.get<AidlEvent::EventPayload::pose6DOF>().values),
- std::end(aidlEvent.payload.get<AidlEvent::EventPayload::data>().values),
+ std::end(aidlEvent.payload.get<AidlEvent::EventPayload::pose6DOF>().values),
hidlEvent->u.pose6DOF.data());
break;
case AidlSensorType::DYNAMIC_SENSOR_META:
@@ -318,4 +318,4 @@ void convertToAidlEvent(const V2_1Event& hidlEvent, AidlEvent* aidlEvent) {
} // namespace sensors
} // namespace hardware
} // namespace android
-} // namespace aidl \ No newline at end of file
+} // namespace aidl