From ae0f99084d890df476e681ad3b85925ee877715f Mon Sep 17 00:00:00 2001 From: Siarhei Vishniakou Date: Mon, 14 Sep 2020 19:23:31 -0500 Subject: 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 --- libs/input/VelocityControl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/input/VelocityControl.cpp') 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; -- cgit v1.2.3-59-g8ed1b