Refactoring Preprocessor. Use ternary operator instead of if-else.

This commit is contained in:
Daniel Marjamäki 2013-08-31 16:13:52 +02:00
parent ed58b63712
commit ab30fa34e4
1 changed files with 2 additions and 4 deletions

View File

@ -1908,10 +1908,8 @@ Preprocessor::HeaderTypes Preprocessor::getHeaderFileName(std::string &str)
std::replace(result.begin(), result.end(), '\\', '/'); std::replace(result.begin(), result.end(), '\\', '/');
str = result; str = result;
if (c == '"')
return UserHeader; return (c == '\"') ? UserHeader : SystemHeader;
else
return SystemHeader;
} }
/** /**