mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 05:03:34 +08:00
Most enums were replaced with constants, according to MISRA
This commit is contained in:
@@ -83,7 +83,7 @@ public:
|
||||
return *static_cast<D*>(this);
|
||||
}
|
||||
|
||||
enum { StringBufSize = 32 };
|
||||
static const unsigned StringBufSize = 32;
|
||||
void toString(char buf[StringBufSize]) const;
|
||||
#if UAVCAN_TOSTRING
|
||||
std::string toString() const;
|
||||
@@ -169,7 +169,7 @@ public:
|
||||
return *static_cast<T*>(this);
|
||||
}
|
||||
|
||||
enum { StringBufSize = 32 };
|
||||
static const unsigned StringBufSize = 32;
|
||||
void toString(char buf[StringBufSize]) const;
|
||||
#if UAVCAN_TOSTRING
|
||||
std::string toString() const;
|
||||
@@ -214,6 +214,12 @@ public:
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
template <typename D>
|
||||
const unsigned DurationBase<D>::StringBufSize;
|
||||
|
||||
template <typename T, typename D>
|
||||
const unsigned TimeBase<T, D>::StringBufSize;
|
||||
|
||||
template <typename D>
|
||||
void DurationBase<D>::toString(char buf[StringBufSize]) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user