Most enums were replaced with constants, according to MISRA

This commit is contained in:
Pavel Kirienko
2014-04-19 15:16:10 +04:00
parent ace2cf9d0e
commit dfe3b4511e
21 changed files with 95 additions and 55 deletions
+8 -2
View File
@@ -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
{