Skip to content

Commit

Permalink
ais1_2_3.cpp: Do not have a using for just one std::abs.
Browse files Browse the repository at this point in the history
  • Loading branch information
schwehr committed Aug 1, 2024
1 parent 65fb806 commit 1988165
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/libais/ais1_2_3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

#include "ais.h"

using std::abs;

namespace libais {

Ais1_2_3::Ais1_2_3(const char *nmea_payload, const size_t pad)
Expand Down Expand Up @@ -35,7 +33,7 @@ Ais1_2_3::Ais1_2_3(const char *nmea_payload, const size_t pad)
nav_status = bits.ToUnsignedInt(38, 4);

rot_raw = bits.ToInt(42, 8);
rot_over_range = abs(rot_raw) > 126 ? true : false;
rot_over_range = std::abs(rot_raw) > 126 ? true : false;
rot = pow((rot_raw/4.733), 2);
if (rot_raw < 0) rot = -rot;

Expand Down

0 comments on commit 1988165

Please sign in to comment.