mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-16 10:10:35 +08:00
Most enums were replaced with constants, according to MISRA
This commit is contained in:
@@ -63,7 +63,7 @@ std::string CanFrame::toString(StringRepresentation mode) const
|
||||
|
||||
assert(mode == StrTight || mode == StrAligned);
|
||||
|
||||
static const int ASCII_COLUMN_OFFSET = 36;
|
||||
static const unsigned AsciiColumnOffset = 36U;
|
||||
|
||||
char buf[50];
|
||||
char* wpos = buf;
|
||||
@@ -96,7 +96,7 @@ std::string CanFrame::toString(StringRepresentation mode) const
|
||||
wpos += snprintf(wpos, epos - wpos, " %02x", unsigned(data[dlen]));
|
||||
}
|
||||
|
||||
while (mode == StrAligned && wpos < buf + ASCII_COLUMN_OFFSET) // alignment
|
||||
while ((mode == StrAligned) && (wpos < buf + AsciiColumnOffset)) // alignment
|
||||
{
|
||||
*wpos++ = ' ';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user