summaryrefslogtreecommitdiff
path: root/libs/input/VelocityControl.cpp
diff options
context:
space:
mode:
author Siarhei Vishniakou <svv@google.com> 2020-09-14 19:23:31 -0500
committer Siarhei Vishniakou <svv@google.com> 2020-09-22 15:05:02 +0000
commitae0f99084d890df476e681ad3b85925ee877715f (patch)
tree85fcf2bbb1f0e2ed37613d2b300cb231a03ee5af /libs/input/VelocityControl.cpp
parentb2d6a712e8fbe7cc81696ed38809689727d30ec6 (diff)
Use std::vector instead of VLA for addMovement
Currently, VLA is used to send data to 'addMovement' in VelocityTracker. Use std::vector instead. This also helps assert against the number of pointers present in the idBits. Bug: 167946721 Test: atest libinput_tests Change-Id: Ie8aabafe9a407a2b07d3edef4d1fa312510ccdba
Diffstat (limited to 'libs/input/VelocityControl.cpp')
-rw-r--r--libs/input/VelocityControl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/input/VelocityControl.cpp b/libs/input/VelocityControl.cpp
index bcf55b0ea3..2c04d420f4 100644
--- a/libs/input/VelocityControl.cpp
+++ b/libs/input/VelocityControl.cpp
@@ -66,7 +66,7 @@ void VelocityControl::move(nsecs_t eventTime, float* deltaX, float* deltaY) {
if (deltaY) {
mRawPosition.y += *deltaY;
}
- mVelocityTracker.addMovement(eventTime, BitSet32(BitSet32::valueForBit(0)), &mRawPosition);
+ mVelocityTracker.addMovement(eventTime, BitSet32(BitSet32::valueForBit(0)), {mRawPosition});
float vx, vy;
float scale = mParameters.scale;