Menu

#31 -code_eol_after_close_brace-0 does not work

open
nobody
None
5
2006-07-11
2006-07-11
BobV
No

When using -code_eol_after_close_brace-0 (is default)
you still get an empty line after each closing brace.

Example:

--------
Before

static LogMask ReadMask(char* pMask)
{
char* s = StripWhiteSpace(pMask);
LogMask ret = 0;
while (true)
{
char* pipe = strchr(s, '|');
if (pipe != NULL)
{
*pipe = '\0';
}
ret |= ReadMaskBit(s);
if (pipe == NULL)
{
break;
}
s = pipe + 1;
}
return ret;
}

--------
After

static LogMask ReadMask(char* pMask)
{
char* s = StripWhiteSpace(pMask);
LogMask ret = 0;
while (true)
{
char* pipe = strchr(s, '|');
if (pipe != NULL)
{
*pipe = '\0';
}

ret |= ReadMaskBit(s);
if (pipe == NULL)
{
break;
}

s = pipe + 1;
}

return ret;
}

Discussion