swap variables
These are the wrong way around. MSVC warns with /W4. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
b8b4a041a1
commit
a10c08ba1d
@ -37,7 +37,7 @@ constexpr RotationMap::OmList RotationMap::omList_[] = {
|
||||
|
||||
uint16_t RotationMap::orientation(int32_t degrees) {
|
||||
uint16_t o = 1;
|
||||
for (auto&& [deg, orient] : omList_) {
|
||||
for (auto&& [orient, deg] : omList_) {
|
||||
if (deg == degrees) {
|
||||
o = orient;
|
||||
break;
|
||||
@ -48,7 +48,7 @@ uint16_t RotationMap::orientation(int32_t degrees) {
|
||||
|
||||
int32_t RotationMap::degrees(uint16_t orientation) {
|
||||
int32_t d = 0;
|
||||
for (auto&& [deg, orient] : omList_) {
|
||||
for (auto&& [orient, deg] : omList_) {
|
||||
if (orient == orientation) {
|
||||
d = deg;
|
||||
break;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user