astyle formatting

This commit is contained in:
Daniel Marjamäki 2011-02-11 19:31:37 +01:00
parent c7821675dd
commit 227a6100f7
4 changed files with 15 additions and 8 deletions

View File

@ -208,7 +208,8 @@ std::string Preprocessor::preprocessCleanupDirectives(const std::string &process
// Preprocessor
if (!line.empty() && line[0] == '#')
{
enum {
enum
{
ESC_NONE,
ESC_SINGLE,
ESC_DOUBLE
@ -234,7 +235,9 @@ std::string Preprocessor::preprocessCleanupDirectives(const std::string &process
{
escapeStatus = ESC_NONE;
}
} else {
}
else
{
// enable esc-mode
if (escapeStatus == ESC_NONE && *i == '"')
escapeStatus = ESC_DOUBLE;
@ -264,7 +267,9 @@ std::string Preprocessor::preprocessCleanupDirectives(const std::string &process
if (escapeStatus != ESC_NONE && prev == '\\' && *i == '\\')
{
prev = ' ';
} else {
}
else
{
prev = *i;
}
i++;
@ -273,7 +278,9 @@ std::string Preprocessor::preprocessCleanupDirectives(const std::string &process
{
// unmatched quotes.. compiler should probably complain about this..
}
} else {
}
else
{
// Do not mess with regular code..
code << line;
}