Omit repeated search
This commit is contained in:
parent
31171f038a
commit
3e9ef0894f
|
@ -2763,8 +2763,9 @@ public:
|
|||
const std::map<std::string, PreprocessorMacro *>::const_iterator it = macros.find(str);
|
||||
if (it != macros.end() && it->second->_macro.find('(') == std::string::npos) {
|
||||
str = it->second->_macro;
|
||||
if (str.find(' ') != std::string::npos)
|
||||
str.erase(0, str.find(' '));
|
||||
const std::string::size_type whitespacePos = str.find(' ');
|
||||
if (whitespacePos != std::string::npos)
|
||||
str.erase(0, whitespacePos);
|
||||
else
|
||||
str = "";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue