Skip to content

Commit

Permalink
FitRideFile : Use qbswap
Browse files Browse the repository at this point in the history
  • Loading branch information
grauser committed Jul 14, 2021
1 parent 8e38632 commit 3e21d6b
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/FileIO/FitRideFile.cpp
Expand Up @@ -308,16 +308,7 @@ struct FitFileReaderState
(*count) += 4;

if (is_big_endian) {
float f2;
char *floatToConvert = ( char* ) & f;
char *returnFloat = ( char* ) & f2;

// swap the bytes into a temporary buffer
returnFloat[0] = floatToConvert[3];
returnFloat[1] = floatToConvert[2];
returnFloat[2] = floatToConvert[1];
returnFloat[3] = floatToConvert[0];
f = f2;
f = qbswap(f);
}

return f;
Expand Down

0 comments on commit 3e21d6b

Please sign in to comment.