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 @@ -1266,19 +1266,30 @@ std::string expr2ct::convert_function(
1266
1266
const exprt &src,
1267
1267
const std::string &name,
1268
1268
unsigned precedence)
1269
+ {
1270
+ return convert_function (src.operands (), name, precedence);
1271
+ }
1272
+
1273
+ std::string expr2ct::convert_function (
1274
+ const exprt::operandst &ops,
1275
+ const std::string &name,
1276
+ unsigned precedence)
1269
1277
{
1270
1278
std::string dest=name;
1271
1279
dest+=' (' ;
1280
+ bool first = true ;
1272
1281
1273
- forall_operands (it, src )
1282
+ for ( const auto &op : ops )
1274
1283
{
1275
1284
unsigned p;
1276
- std::string op =convert_with_precedence (*it , p);
1285
+ const std::string op_str =convert_with_precedence (op , p);
1277
1286
1278
- if (it!=src.operands ().begin ())
1287
+ if (first)
1288
+ first=false ;
1289
+ else
1279
1290
dest+=" , " ;
1280
1291
1281
- dest+=op ;
1292
+ dest+=op_str ;
1282
1293
}
1283
1294
1284
1295
dest+=' )' ;
@@ -3011,7 +3022,7 @@ std::string expr2ct::convert_code(
3011
3022
if (statement==" set_may" ||
3012
3023
statement==" set_must" )
3013
3024
return
3014
- indent_str (indent)+convert_function (src, id2string (statement), 16 )+" ;" ;
3025
+ indent_str (indent)+convert_function (src. operands () , id2string (statement), 16 )+" ;" ;
3015
3026
3016
3027
unsigned precedence;
3017
3028
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