From 03a4c84fec32b39a20f0f5e0b86da16481c51a8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 30 Dec 2017 12:27:55 +0100 Subject: [PATCH] Rename variables --- lib/templatesimplifier.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/templatesimplifier.cpp b/lib/templatesimplifier.cpp index bb21ad008..d519b6772 100644 --- a/lib/templatesimplifier.cpp +++ b/lib/templatesimplifier.cpp @@ -1655,17 +1655,17 @@ void TemplateSimplifier::simplifyTemplates( } } - std::list templates(TemplateSimplifier::getTemplateDeclarations(tokenlist.front(), _codeWithTemplates)); + std::list templateDeclarations(TemplateSimplifier::getTemplateDeclarations(tokenlist.front(), _codeWithTemplates)); // Locate possible instantiations of templates.. - std::list templateInstantiations(TemplateSimplifier::getTemplateInstantiations(tokenlist.front(), templates)); + std::list templateInstantiations(TemplateSimplifier::getTemplateInstantiations(tokenlist.front(), templateDeclarations)); // No template instantiations? Then return. if (templateInstantiations.empty()) return; // Template arguments with default values - TemplateSimplifier::useDefaultArgumentValues(templates, &templateInstantiations); + TemplateSimplifier::useDefaultArgumentValues(templateDeclarations, &templateInstantiations); TemplateSimplifier::simplifyTemplateAliases(&templateInstantiations); @@ -1674,8 +1674,8 @@ void TemplateSimplifier::simplifyTemplates( //while (!done) { //done = true; - std::list templates2; - for (std::list::reverse_iterator iter1 = templates.rbegin(); iter1 != templates.rend(); ++iter1) { + std::list instantiatedTemplates; + for (std::list::reverse_iterator iter1 = templateDeclarations.rbegin(); iter1 != templateDeclarations.rend(); ++iter1) { bool instantiated = TemplateSimplifier::simplifyTemplateInstantiations(tokenlist, errorlogger, _settings, @@ -1684,17 +1684,17 @@ void TemplateSimplifier::simplifyTemplates( templateInstantiations, expandedtemplates); if (instantiated) - templates2.push_back(*iter1); + instantiatedTemplates.push_back(*iter1); } - for (std::list::const_iterator it = templates2.begin(); it != templates2.end(); ++it) { + for (std::list::const_iterator it = instantiatedTemplates.begin(); it != instantiatedTemplates.end(); ++it) { std::list::iterator it1; - for (it1 = templates.begin(); it1 != templates.end(); ++it1) { + for (it1 = templateDeclarations.begin(); it1 != templateDeclarations.end(); ++it1) { if (it1->token == it->token) break; } - if (it1 != templates.end()) { - templates.erase(it1); + if (it1 != templateDeclarations.end()) { + templateDeclarations.erase(it1); removeTemplate(it->token); } }