Restore compatibility with current C++ language set specification (VS2010)

This commit is contained in:
amai2012 2016-04-24 23:02:56 +02:00
parent 7a8a6695a4
commit 479f00030e
1 changed files with 10 additions and 10 deletions

View File

@ -2419,16 +2419,16 @@ void SymbolDatabase::printOut(const char *title) const
std::cout << "int"; std::cout << "int";
std::cout << std::endl; std::cout << std::endl;
std::cout << " enumClass: " << scope->enumClass << std::endl; std::cout << " enumClass: " << scope->enumClass << std::endl;
for (const Enumerator & enumerator : scope->enumeratorList) { for (std::vector<Enumerator>::const_iterator enumerator = scope->enumeratorList.begin(); enumerator != scope->enumeratorList.end(); ++enumerator) {
std::cout << " Enumerator: " << enumerator.name->str() << " = "; std::cout << " Enumerator: " << enumerator->name->str() << " = ";
if (enumerator.value_known) { if (enumerator->value_known) {
std::cout << enumerator.value; std::cout << enumerator->value;
} }
if (enumerator.start) { if (enumerator->start) {
const Token * tok = enumerator.start; const Token * tok = enumerator->start;
std::cout << (enumerator.value_known ? " " : "") << "[" << tok->str(); std::cout << (enumerator->value_known ? " " : "") << "[" << tok->str();
while (tok && tok != enumerator.end) { while (tok && tok != enumerator->end) {
if (tok->next()) if (tok->next())
std::cout << " " << tok->next()->str(); std::cout << " " << tok->next()->str();
tok = tok->next(); tok = tok->next();
@ -3358,8 +3358,8 @@ const Enumerator * SymbolDatabase::findEnumerator(const Token * tok) const
if (enumerator) if (enumerator)
return enumerator; return enumerator;
for (const Scope * s : scope->nestedList) { for (std::list<Scope *>::const_iterator s = scope->nestedList.begin(); s != scope->nestedList.end(); ++s) {
enumerator = s->findEnumerator(tok->str()); enumerator = (*s)->findEnumerator(tok->str());
if (enumerator) if (enumerator)
return enumerator; return enumerator;