@@ -1581,7 +1581,7 @@ void TemplateSimplifier::addNamespace(const TokenAndName &templateDeclaration, c
15811581 }
15821582 } else {
15831583 if (insert)
1584- mTokenList .back ()->tokAt (offset)->insertToken (token, emptyString );
1584+ mTokenList .back ()->tokAt (offset)->insertToken (token);
15851585 else
15861586 mTokenList .addtoken (token, tok->linenr (), tok->column (), tok->fileIndex ());
15871587 }
@@ -1592,10 +1592,10 @@ void TemplateSimplifier::addNamespace(const TokenAndName &templateDeclaration, c
15921592 if (token != tokStart->str () || tok->strAt (-1 ) != " ::" ) {
15931593 if (insert) {
15941594 if (!inTemplate)
1595- mTokenList .back ()->tokAt (offset)->insertToken (templateDeclaration.scope ().substr (start), emptyString );
1595+ mTokenList .back ()->tokAt (offset)->insertToken (templateDeclaration.scope ().substr (start));
15961596 else
15971597 mTokenList .back ()->tokAt (offset)->str (mTokenList .back ()->strAt (offset) + templateDeclaration.scope ().substr (start));
1598- mTokenList .back ()->tokAt (offset)->insertToken (" ::" , emptyString );
1598+ mTokenList .back ()->tokAt (offset)->insertToken (" ::" );
15991599 } else {
16001600 if (!inTemplate)
16011601 mTokenList .addtoken (templateDeclaration.scope ().substr (start), tok->linenr (), tok->column (), tok->fileIndex ());
@@ -1762,7 +1762,7 @@ void TemplateSimplifier::expandTemplate(
17621762 ++typeindentlevel;
17631763 else if (typetok->str () == " )" )
17641764 --typeindentlevel;
1765- dst->insertToken (typetok->str (), typetok->originalName (), typetok->getMacroName (), true );
1765+ dst->insertTokenBefore (typetok->str (), typetok->originalName (), typetok->getMacroName ());
17661766 dst->previous ()->linenr (start->linenr ());
17671767 dst->previous ()->column (start->column ());
17681768 Token *previous = dst->previous ();
@@ -1790,7 +1790,7 @@ void TemplateSimplifier::expandTemplate(
17901790 }
17911791 }
17921792 if (pointerType && Token::simpleMatch (dst1, " const" )) {
1793- dst->insertToken (" const" , dst1->originalName (), dst1->getMacroName (), true );
1793+ dst->insertTokenBefore (" const" , dst1->originalName (), dst1->getMacroName ());
17941794 dst->previous ()->linenr (start->linenr ());
17951795 dst->previous ()->column (start->column ());
17961796 dst1->deleteThis ();
@@ -1842,15 +1842,15 @@ void TemplateSimplifier::expandTemplate(
18421842 }
18431843 // just copy the token if it wasn't instantiated
18441844 if (start != closing) {
1845- dst->insertToken (start->str (), start->originalName (), start->getMacroName (), true );
1845+ dst->insertTokenBefore (start->str (), start->originalName (), start->getMacroName ());
18461846 dst->previous ()->linenr (start->linenr ());
18471847 dst->previous ()->column (start->column ());
18481848 dst->previous ()->isSigned (start->isSigned ());
18491849 dst->previous ()->isUnsigned (start->isUnsigned ());
18501850 dst->previous ()->isLong (start->isLong ());
18511851 }
18521852 } else {
1853- dst->insertToken (start->str (), start->originalName (), start->getMacroName (), true );
1853+ dst->insertTokenBefore (start->str (), start->originalName (), start->getMacroName ());
18541854 dst->previous ()->linenr (start->linenr ());
18551855 dst->previous ()->column (start->column ());
18561856 dst->previous ()->isSigned (start->isSigned ());
0 commit comments