astyle formatting

[ci skip]
This commit is contained in:
Daniel Marjamäki 2018-12-21 13:54:59 +01:00
parent 431d068339
commit b97b3b7ef8
2 changed files with 6 additions and 12 deletions

View File

@ -1484,8 +1484,7 @@ bool TemplateSimplifier::simplifyNumericCalculations(Token *tok)
bool TemplateSimplifier::simplifyCalculations(Token* frontToken) bool TemplateSimplifier::simplifyCalculations(Token* frontToken)
{ {
bool ret = false; bool ret = false;
if (!frontToken) if (!frontToken) {
{
frontToken = mTokenList.front(); frontToken = mTokenList.front();
} }
for (Token *tok = frontToken; tok; tok = tok->next()) { for (Token *tok = frontToken; tok; tok = tok->next()) {
@ -2051,8 +2050,7 @@ void TemplateSimplifier::replaceTemplateUsage(
if (tok->isName() && !tok->templateSimplifierPointers().empty()) { if (tok->isName() && !tok->templateSimplifierPointers().empty()) {
std::list<TokenAndName>::iterator ti; std::list<TokenAndName>::iterator ti;
for (ti = mTemplateInstantiations.begin(); ti != mTemplateInstantiations.end();) { for (ti = mTemplateInstantiations.begin(); ti != mTemplateInstantiations.end();) {
if (ti->token == tok) if (ti->token == tok) {
{
mTemplateInstantiations.erase(ti++); mTemplateInstantiations.erase(ti++);
break; break;
} else { } else {

View File

@ -235,13 +235,11 @@ void Token::swapWithNext()
std::swap(mTokType, mNext->mTokType); std::swap(mTokType, mNext->mTokType);
std::swap(mFlags, mNext->mFlags); std::swap(mFlags, mNext->mFlags);
std::swap(mImpl, mNext->mImpl); std::swap(mImpl, mNext->mImpl);
for (auto templateSimplifierPointer : mImpl->mTemplateSimplifierPointers) for (auto templateSimplifierPointer : mImpl->mTemplateSimplifierPointers) {
{
templateSimplifierPointer->token = this; templateSimplifierPointer->token = this;
} }
for (auto templateSimplifierPointer : mNext->mImpl->mTemplateSimplifierPointers) for (auto templateSimplifierPointer : mNext->mImpl->mTemplateSimplifierPointers) {
{
templateSimplifierPointer->token = mNext; templateSimplifierPointer->token = mNext;
} }
if (mNext->mLink) if (mNext->mLink)
@ -260,8 +258,7 @@ void Token::takeData(Token *fromToken)
delete mImpl; delete mImpl;
mImpl = fromToken->mImpl; mImpl = fromToken->mImpl;
fromToken->mImpl = nullptr; fromToken->mImpl = nullptr;
for (auto templateSimplifierPointer : mImpl->mTemplateSimplifierPointers) for (auto templateSimplifierPointer : mImpl->mTemplateSimplifierPointers) {
{
templateSimplifierPointer->token = this; templateSimplifierPointer->token = this;
} }
mLink = fromToken->mLink; mLink = fromToken->mLink;
@ -1710,8 +1707,7 @@ TokenImpl::~TokenImpl()
delete mValueType; delete mValueType;
delete mValues; delete mValues;
for (auto templateSimplifierPointer : mTemplateSimplifierPointers) for (auto templateSimplifierPointer : mTemplateSimplifierPointers) {
{
templateSimplifierPointer->token = nullptr; templateSimplifierPointer->token = nullptr;
} }
} }