File tree 2 files changed +23
-6
lines changed 2 files changed +23
-6
lines changed Original file line number Diff line number Diff line change @@ -1264,19 +1264,30 @@ std::string expr2ct::convert_function(
1264
1264
const exprt &src,
1265
1265
const std::string &name,
1266
1266
unsigned precedence)
1267
+ {
1268
+ return convert_function (src.operands (), name, precedence);
1269
+ }
1270
+
1271
+ std::string expr2ct::convert_function (
1272
+ const exprt::operandst &ops,
1273
+ const std::string &name,
1274
+ unsigned precedence)
1267
1275
{
1268
1276
std::string dest=name;
1269
1277
dest+=' (' ;
1278
+ bool first = true ;
1270
1279
1271
- forall_operands (it, src )
1280
+ for ( const auto &op : ops )
1272
1281
{
1273
1282
unsigned p;
1274
- std::string op =convert_with_precedence (*it , p);
1283
+ const std::string op_str =convert_with_precedence (op , p);
1275
1284
1276
- if (it!=src.operands ().begin ())
1285
+ if (first)
1286
+ first=false ;
1287
+ else
1277
1288
dest+=" , " ;
1278
1289
1279
- dest+=op ;
1290
+ dest+=op_str ;
1280
1291
}
1281
1292
1282
1293
dest+=' )' ;
@@ -3005,7 +3016,7 @@ std::string expr2ct::convert_code(
3005
3016
if (statement==" set_may" ||
3006
3017
statement==" set_must" )
3007
3018
return
3008
- indent_str (indent)+convert_function (src, id2string (statement), 16 )+" ;" ;
3019
+ indent_str (indent)+convert_function (src. operands () , id2string (statement), 16 )+" ;" ;
3009
3020
3010
3021
unsigned precedence;
3011
3022
return convert_norep (src, precedence);
Original file line number Diff line number Diff line change @@ -167,7 +167,13 @@ class expr2ct
167
167
unsigned precedence);
168
168
169
169
std::string convert_function (
170
- const exprt &src, const std::string &symbol,
170
+ const exprt::operandst &ops,
171
+ const std::string &symbol,
172
+ unsigned precedence);
173
+
174
+ std::string convert_function (
175
+ const exprt &src,
176
+ const std::string &symbol,
171
177
unsigned precedence);
172
178
173
179
std::string convert_complex (
You can’t perform that action at this time.
0 commit comments