Browse Source

AP_Math: narrow enumeration to uint8_t to avoid narrowing-warnings

/home/pbarker/rc/ardupilot/libraries/DataFlash/LogFile.cpp:361:25:
error: non-constant-expression cannot be narrowed from type 'enum
Rotation' to 'uint8_t' (aka 'unsigned char') in initializer list
[-Wc++11-narrowing]
        orient1       : s0 ? s0->orientation() : ROTATION_NONE,
mission-4.1.18
Peter Barker 7 years ago committed by Randy Mackay
parent
commit
febcdd766b
  1. 2
      libraries/AP_Math/rotations.h

2
libraries/AP_Math/rotations.h

@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
// NOTE!! these rotation values are stored to EEPROM, so be careful not to
// change the numbering of any existing entry when adding a new entry.
enum Rotation {
enum Rotation : uint8_t {
ROTATION_NONE = 0,
ROTATION_YAW_45 = 1,
ROTATION_YAW_90 = 2,

Loading…
Cancel
Save