Most enums were replaced with constants, according to MISRA

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