From febcdd766bdf0fb357a6d418da5e7f7f0e8c19e3 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sun, 1 Apr 2018 01:38:41 +1100 Subject: [PATCH] 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, --- libraries/AP_Math/rotations.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Math/rotations.h b/libraries/AP_Math/rotations.h index 0d0f333b74..390f1dcae8 100644 --- a/libraries/AP_Math/rotations.h +++ b/libraries/AP_Math/rotations.h @@ -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,