swap variables

These are the wrong way around. MSVC warns with /W4.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
main
Rosen Penev 2 years ago
parent b8b4a041a1
commit a10c08ba1d

@ -37,7 +37,7 @@ constexpr RotationMap::OmList RotationMap::omList_[] = {
uint16_t RotationMap::orientation(int32_t degrees) { uint16_t RotationMap::orientation(int32_t degrees) {
uint16_t o = 1; uint16_t o = 1;
for (auto&& [deg, orient] : omList_) { for (auto&& [orient, deg] : omList_) {
if (deg == degrees) { if (deg == degrees) {
o = orient; o = orient;
break; break;
@ -48,7 +48,7 @@ uint16_t RotationMap::orientation(int32_t degrees) {
int32_t RotationMap::degrees(uint16_t orientation) { int32_t RotationMap::degrees(uint16_t orientation) {
int32_t d = 0; int32_t d = 0;
for (auto&& [deg, orient] : omList_) { for (auto&& [orient, deg] : omList_) {
if (orient == orientation) { if (orient == orientation) {
d = deg; d = deg;
break; break;

Loading…
Cancel
Save