@@ -1147,6 +1147,7 @@ void Tokenizer::simplifyTypedef()
1147
1147
1148
1148
void Tokenizer::simplifyTypedefCpp()
1149
1149
{
1150
+ const bool cpp = isCPP();
1150
1151
bool isNamespace = false;
1151
1152
std::string className, fullClassName;
1152
1153
bool hasClass = false;
@@ -1714,7 +1715,7 @@ void Tokenizer::simplifyTypedefCpp()
1714
1715
}
1715
1716
1716
1717
// check for member functions
1717
- else if (tok2->isCpp() && tok2->str() == "(" && isFunctionHead(tok2, "{:")) {
1718
+ else if (cpp && tok2->str() == "(" && isFunctionHead(tok2, "{:")) {
1718
1719
const Token *func = tok2->previous();
1719
1720
1720
1721
/** @todo add support for multi-token operators */
@@ -1741,7 +1742,7 @@ void Tokenizer::simplifyTypedefCpp()
1741
1742
// check for entering a new scope
1742
1743
else if (tok2->str() == "{") {
1743
1744
// check for entering a new namespace
1744
- if (tok2->isCpp() ) {
1745
+ if (cpp ) {
1745
1746
if (tok2->strAt(-2) == "namespace") {
1746
1747
if (classLevel < spaceInfo.size() &&
1747
1748
spaceInfo[classLevel].isNamespace &&
@@ -1770,7 +1771,7 @@ void Tokenizer::simplifyTypedefCpp()
1770
1771
1771
1772
// check for operator typedef
1772
1773
/** @todo add support for multi-token operators */
1773
- else if (tok2->isCpp() &&
1774
+ else if (cpp &&
1774
1775
tok2->str() == "operator" &&
1775
1776
tok2->next() &&
1776
1777
tok2->next()->str() == typeName->str() &&
0 commit comments