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 @@ -1224,19 +1224,30 @@ std::string expr2ct::convert_function(
1224
1224
const exprt &src,
1225
1225
const std::string &name,
1226
1226
unsigned precedence)
1227
+ {
1228
+ return convert_function (src.operands (), name, precedence);
1229
+ }
1230
+
1231
+ std::string expr2ct::convert_function (
1232
+ const exprt::operandst &ops,
1233
+ const std::string &name,
1234
+ unsigned precedence)
1227
1235
{
1228
1236
std::string dest=name;
1229
1237
dest+=' (' ;
1238
+ bool first = true ;
1230
1239
1231
- forall_operands (it, src )
1240
+ for ( const auto &op : ops )
1232
1241
{
1233
1242
unsigned p;
1234
- std::string op =convert_with_precedence (*it , p);
1243
+ const std::string op_str =convert_with_precedence (op , p);
1235
1244
1236
- if (it!=src.operands ().begin ())
1245
+ if (first)
1246
+ first=false ;
1247
+ else
1237
1248
dest+=" , " ;
1238
1249
1239
- dest+=op ;
1250
+ dest+=op_str ;
1240
1251
}
1241
1252
1242
1253
dest+=' )' ;
@@ -2957,7 +2968,7 @@ std::string expr2ct::convert_code(
2957
2968
if (statement==" set_may" ||
2958
2969
statement==" set_must" )
2959
2970
return
2960
- indent_str (indent)+convert_function (src, id2string (statement), 16 )+" ;" ;
2971
+ indent_str (indent)+convert_function (src. operands () , id2string (statement), 16 )+" ;" ;
2961
2972
2962
2973
unsigned precedence;
2963
2974
return convert_norep (src, precedence);
Original file line number Diff line number Diff line change @@ -169,7 +169,13 @@ class expr2ct
169
169
unsigned precedence);
170
170
171
171
std::string convert_function (
172
- const exprt &src, const std::string &symbol,
172
+ const exprt::operandst &ops,
173
+ const std::string &symbol,
174
+ unsigned precedence);
175
+
176
+ std::string convert_function (
177
+ const exprt &src,
178
+ const std::string &symbol,
173
179
unsigned precedence);
174
180
175
181
std::string convert_complex (
You can’t perform that action at this time.
0 commit comments