parent
431d068339
commit
b97b3b7ef8
|
@ -1484,8 +1484,7 @@ bool TemplateSimplifier::simplifyNumericCalculations(Token *tok)
|
|||
bool TemplateSimplifier::simplifyCalculations(Token* frontToken)
|
||||
{
|
||||
bool ret = false;
|
||||
if (!frontToken)
|
||||
{
|
||||
if (!frontToken) {
|
||||
frontToken = mTokenList.front();
|
||||
}
|
||||
for (Token *tok = frontToken; tok; tok = tok->next()) {
|
||||
|
@ -2051,8 +2050,7 @@ void TemplateSimplifier::replaceTemplateUsage(
|
|||
if (tok->isName() && !tok->templateSimplifierPointers().empty()) {
|
||||
std::list<TokenAndName>::iterator ti;
|
||||
for (ti = mTemplateInstantiations.begin(); ti != mTemplateInstantiations.end();) {
|
||||
if (ti->token == tok)
|
||||
{
|
||||
if (ti->token == tok) {
|
||||
mTemplateInstantiations.erase(ti++);
|
||||
break;
|
||||
} else {
|
||||
|
|
|
@ -235,13 +235,11 @@ void Token::swapWithNext()
|
|||
std::swap(mTokType, mNext->mTokType);
|
||||
std::swap(mFlags, mNext->mFlags);
|
||||
std::swap(mImpl, mNext->mImpl);
|
||||
for (auto templateSimplifierPointer : mImpl->mTemplateSimplifierPointers)
|
||||
{
|
||||
for (auto templateSimplifierPointer : mImpl->mTemplateSimplifierPointers) {
|
||||
templateSimplifierPointer->token = this;
|
||||
}
|
||||
|
||||
for (auto templateSimplifierPointer : mNext->mImpl->mTemplateSimplifierPointers)
|
||||
{
|
||||
for (auto templateSimplifierPointer : mNext->mImpl->mTemplateSimplifierPointers) {
|
||||
templateSimplifierPointer->token = mNext;
|
||||
}
|
||||
if (mNext->mLink)
|
||||
|
@ -260,8 +258,7 @@ void Token::takeData(Token *fromToken)
|
|||
delete mImpl;
|
||||
mImpl = fromToken->mImpl;
|
||||
fromToken->mImpl = nullptr;
|
||||
for (auto templateSimplifierPointer : mImpl->mTemplateSimplifierPointers)
|
||||
{
|
||||
for (auto templateSimplifierPointer : mImpl->mTemplateSimplifierPointers) {
|
||||
templateSimplifierPointer->token = this;
|
||||
}
|
||||
mLink = fromToken->mLink;
|
||||
|
@ -1710,8 +1707,7 @@ TokenImpl::~TokenImpl()
|
|||
delete mValueType;
|
||||
delete mValues;
|
||||
|
||||
for (auto templateSimplifierPointer : mTemplateSimplifierPointers)
|
||||
{
|
||||
for (auto templateSimplifierPointer : mTemplateSimplifierPointers) {
|
||||
templateSimplifierPointer->token = nullptr;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue