Repair test which had to be adjusted after previous changeset.
Refactoring: Add some const
This commit is contained in:
parent
919fcb38f5
commit
a8db00b4bf
|
@ -162,7 +162,7 @@ void Variables::alias(unsigned int varid1, unsigned int varid2, bool replace)
|
|||
|
||||
if (replace) {
|
||||
// remove var1 from all aliases
|
||||
for (std::set<unsigned int>::iterator i = var1->_aliases.begin(); i != var1->_aliases.end(); ++i) {
|
||||
for (std::set<unsigned int>::const_iterator i = var1->_aliases.begin(); i != var1->_aliases.end(); ++i) {
|
||||
VariableUsage *temp = find(*i);
|
||||
|
||||
if (temp)
|
||||
|
@ -174,7 +174,7 @@ void Variables::alias(unsigned int varid1, unsigned int varid2, bool replace)
|
|||
}
|
||||
|
||||
// var1 gets all var2s aliases
|
||||
for (std::set<unsigned int>::iterator i = var2->_aliases.begin(); i != var2->_aliases.end(); ++i) {
|
||||
for (std::set<unsigned int>::const_iterator i = var2->_aliases.begin(); i != var2->_aliases.end(); ++i) {
|
||||
if (*i != varid1)
|
||||
var1->_aliases.insert(*i);
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ void Variables::clearAliases(unsigned int varid)
|
|||
|
||||
if (usage) {
|
||||
// remove usage from all aliases
|
||||
std::set<unsigned int>::iterator i;
|
||||
std::set<unsigned int>::const_iterator i;
|
||||
|
||||
for (i = usage->_aliases.begin(); i != usage->_aliases.end(); ++i) {
|
||||
VariableUsage *temp = find(*i);
|
||||
|
@ -214,7 +214,7 @@ void Variables::eraseAliases(unsigned int varid)
|
|||
VariableUsage *usage = find(varid);
|
||||
|
||||
if (usage) {
|
||||
std::set<unsigned int>::iterator aliases;
|
||||
std::set<unsigned int>::const_iterator aliases;
|
||||
|
||||
for (aliases = usage->_aliases.begin(); aliases != usage->_aliases.end(); ++aliases)
|
||||
erase(*aliases);
|
||||
|
@ -301,7 +301,7 @@ void Variables::writeAliases(unsigned int varid, const Token* tok)
|
|||
VariableUsage *usage = find(varid);
|
||||
|
||||
if (usage) {
|
||||
std::set<unsigned int>::iterator aliases;
|
||||
std::set<unsigned int>::const_iterator aliases;
|
||||
|
||||
for (aliases = usage->_aliases.begin(); aliases != usage->_aliases.end(); ++aliases) {
|
||||
VariableUsage *aliased = find(*aliases);
|
||||
|
@ -328,7 +328,7 @@ void Variables::use(unsigned int varid, const Token* tok)
|
|||
usage->use(_varReadInScope);
|
||||
usage->_lastAccess = tok;
|
||||
|
||||
std::set<unsigned int>::iterator aliases;
|
||||
std::set<unsigned int>::const_iterator aliases;
|
||||
|
||||
for (aliases = usage->_aliases.begin(); aliases != usage->_aliases.end(); ++aliases) {
|
||||
VariableUsage *aliased = find(*aliases);
|
||||
|
@ -349,7 +349,7 @@ void Variables::modified(unsigned int varid, const Token* tok)
|
|||
usage->_modified = true;
|
||||
usage->_lastAccess = tok;
|
||||
|
||||
std::set<unsigned int>::iterator aliases;
|
||||
std::set<unsigned int>::const_iterator aliases;
|
||||
|
||||
for (aliases = usage->_aliases.begin(); aliases != usage->_aliases.end(); ++aliases) {
|
||||
VariableUsage *aliased = find(*aliases);
|
||||
|
|
|
@ -5868,11 +5868,11 @@ private:
|
|||
void borland() {
|
||||
// __closure
|
||||
ASSERT_EQUALS("int * a ;",
|
||||
tokenizeAndStringify("int (__closure *a)();", false));
|
||||
tokenizeAndStringify("int (__closure *a)();", false, true, Settings::Win32A));
|
||||
|
||||
// __property
|
||||
ASSERT_EQUALS("class Fred { ; __property ; } ;",
|
||||
tokenizeAndStringify("class Fred { __property int x = { } };", false));
|
||||
tokenizeAndStringify("class Fred { __property int x = { } };", false, true, Settings::Win32A));
|
||||
}
|
||||
|
||||
void Qt() {
|
||||
|
|
Loading…
Reference in New Issue