summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomáš Pazdiora <[email protected]>2021-01-05 19:18:40 +0100
committerTomáš Pazdiora <[email protected]>2021-01-05 19:18:40 +0100
commitb9c79a8d13aaae30950da318526e2f4707062c4b (patch)
treec48634281604bad68c5cefd09f93a7139472b93a
parentsimplify checking for configuration without specific device (diff)
downloadrawaccel-b9c79a8d13aaae30950da318526e2f4707062c4b.tar.xz
rawaccel-b9c79a8d13aaae30950da318526e2f4707062c4b.zip
revert for loop -> do while (according to a1xd's conclusion)
-rw-r--r--driver/driver.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/driver/driver.cpp b/driver/driver.cpp
index 38d127b..1cdfadf 100644
--- a/driver/driver.cpp
+++ b/driver/driver.cpp
@@ -68,7 +68,8 @@ Arguments:
vec2d carry = devExt->carry;
- for (auto it = InputDataStart; it != InputDataEnd; ++it) {
+ auto it = InputDataStart;
+ do {
vec2d input = {
static_cast<double>(it->LastX),
static_cast<double>(it->LastY)
@@ -104,7 +105,7 @@ Arguments:
it->LastX = out_x;
it->LastY = out_y;
- }
+ } while (++it != InputDataEnd);
devExt->carry = carry;
}