@@ -20,12 +20,11 @@ std::size_t to_be_merged_irept::hash() const
20
20
forall_irep (it, sub)
21
21
result=hash_combine (result, static_cast <const merged_irept &>(*it).hash ());
22
22
23
- forall_named_irep (it, named_sub)
23
+ for ( const auto &irep_entry : named_sub)
24
24
{
25
- result=hash_combine (result, hash_string (it->first ));
26
- result=
27
- hash_combine (
28
- result, static_cast <const merged_irept &>(it->second ).hash ());
25
+ result = hash_combine (result, hash_string (irep_entry.first ));
26
+ result = hash_combine (
27
+ result, static_cast <const merged_irept &>(irep_entry.second ).hash ());
29
28
}
30
29
31
30
const std::size_t named_sub_size = named_sub.size ();
@@ -108,14 +107,15 @@ const merged_irept &merged_irepst::merged(const irept &irep)
108
107
#if NAMED_SUB_IS_FORWARD_LIST
109
108
irept::named_subt::iterator before = dest_named_sub.before_begin ();
110
109
#endif
111
- forall_named_irep (it, src_named_sub)
110
+ for ( const auto &irep_entry : src_named_sub)
112
111
{
113
112
#if NAMED_SUB_IS_FORWARD_LIST
114
113
dest_named_sub.emplace_after (
115
- before, it-> first , merged (it-> second )); // recursive call
114
+ before, irep_entry. first , merged (irep_entry. second )); // recursive call
116
115
++before;
117
116
#else
118
- dest_named_sub[it->first ]=merged (it->second ); // recursive call
117
+ dest_named_sub[irep_entry.first ] =
118
+ merged (irep_entry.second ); // recursive call
119
119
#endif
120
120
}
121
121
@@ -164,12 +164,12 @@ const irept &merge_irept::merged(const irept &irep)
164
164
irept::named_subt *dest_named_sub_ptr = nullptr ;
165
165
166
166
std::ptrdiff_t advance_by = 0 ;
167
- forall_named_irep (it, src_named_sub)
167
+ for ( const auto &irep_entry : src_named_sub)
168
168
{
169
- if (!irept::is_comment (it-> first ))
169
+ if (!irept::is_comment (irep_entry. first ))
170
170
{
171
- const irept &op = merged (it-> second ); // recursive call
172
- if (&op.read () != &(it-> second .read ()))
171
+ const irept &op = merged (irep_entry. second ); // recursive call
172
+ if (&op.read () != &(irep_entry. second .read ()))
173
173
{
174
174
if (!dest_named_sub_ptr)
175
175
dest_named_sub_ptr =
@@ -212,14 +212,15 @@ const irept &merge_full_irept::merged(const irept &irep)
212
212
#if NAMED_SUB_IS_FORWARD_LIST
213
213
irept::named_subt::iterator before = dest_named_sub.before_begin ();
214
214
#endif
215
- forall_named_irep (it, src_named_sub)
215
+ for ( const auto &irep_entry : src_named_sub)
216
216
{
217
217
#if NAMED_SUB_IS_FORWARD_LIST
218
218
dest_named_sub.emplace_after (
219
- before, it-> first , merged (it-> second )); // recursive call
219
+ before, irep_entry. first , merged (irep_entry. second )); // recursive call
220
220
++before;
221
221
#else
222
- dest_named_sub[it->first ]=merged (it->second ); // recursive call
222
+ dest_named_sub[irep_entry.first ] =
223
+ merged (irep_entry.second ); // recursive call
223
224
#endif
224
225
}
225
226
0 commit comments