Skip to content

Commit

Permalink
swap variables in for loops
Browse files Browse the repository at this point in the history
These might be swapped. The second parameter is definitely degrees.
  • Loading branch information
neheb committed Jan 4, 2023
1 parent b85239a commit 2a20a09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/crwimage_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 2a20a09

Please sign in to comment.