@@ -51,12 +51,9 @@ void cpp_scopet::lookup(
51
51
return ; // done
52
52
53
53
// using scopes
54
- for (scope_listt::iterator
55
- it=using_scopes.begin ();
56
- it!=using_scopes.end ();
57
- it++)
54
+ for (const auto &s_ptr : using_scopes)
58
55
{
59
- cpp_scopet &other_scope= static_cast <cpp_scopet &>(**it );
56
+ cpp_scopet &other_scope = static_cast <cpp_scopet &>(*s_ptr );
60
57
61
58
// Recursive call.
62
59
// Note the different kind!
@@ -67,12 +64,9 @@ void cpp_scopet::lookup(
67
64
return ; // done, upwards scopes are hidden
68
65
69
66
// secondary scopes
70
- for (scope_listt::iterator
71
- it=secondary_scopes.begin ();
72
- it!=secondary_scopes.end ();
73
- it++)
67
+ for (const auto &s_ptr : secondary_scopes)
74
68
{
75
- cpp_scopet &other_scope= static_cast <cpp_scopet &>(**it );
69
+ cpp_scopet &other_scope = static_cast <cpp_scopet &>(*s_ptr );
76
70
77
71
// Recursive call.
78
72
// Note the different kind!
@@ -130,12 +124,9 @@ void cpp_scopet::lookup(
130
124
return ; // done
131
125
132
126
// using scopes
133
- for (scope_listt::iterator
134
- it=using_scopes.begin ();
135
- it!=using_scopes.end ();
136
- it++)
127
+ for (const auto &s_ptr : using_scopes)
137
128
{
138
- cpp_scopet &other_scope= static_cast <cpp_scopet &>(**it );
129
+ cpp_scopet &other_scope = static_cast <cpp_scopet &>(*s_ptr );
139
130
140
131
// Recursive call.
141
132
// Note the different kind!
@@ -146,12 +137,9 @@ void cpp_scopet::lookup(
146
137
return ; // done, upwards scopes are hidden
147
138
148
139
// secondary scopes
149
- for (scope_listt::iterator
150
- it=secondary_scopes.begin ();
151
- it!=secondary_scopes.end ();
152
- it++)
140
+ for (const auto &s_ptr : secondary_scopes)
153
141
{
154
- cpp_scopet &other_scope= static_cast <cpp_scopet &>(**it );
142
+ cpp_scopet &other_scope = static_cast <cpp_scopet &>(*s_ptr );
155
143
156
144
// Recursive call.
157
145
// Note the different kind!
0 commit comments