File tree Expand file tree Collapse file tree 2 files changed +23
-6
lines changed Expand file tree Collapse file tree 2 files changed +23
-6
lines changed Original file line number Diff line number Diff line change @@ -1225,19 +1225,30 @@ std::string expr2ct::convert_function(
1225
1225
const exprt &src,
1226
1226
const std::string &name,
1227
1227
unsigned precedence)
1228
+ {
1229
+ return convert_function (src.operands (), name, precedence);
1230
+ }
1231
+
1232
+ std::string expr2ct::convert_function (
1233
+ const exprt::operandst &ops,
1234
+ const std::string &name,
1235
+ unsigned precedence)
1228
1236
{
1229
1237
std::string dest=name;
1230
1238
dest+=' (' ;
1239
+ bool first = true ;
1231
1240
1232
- forall_operands (it, src )
1241
+ for ( const auto &op : ops )
1233
1242
{
1234
1243
unsigned p;
1235
- std::string op =convert_with_precedence (*it , p);
1244
+ const std::string op_str =convert_with_precedence (op , p);
1236
1245
1237
- if (it!=src.operands ().begin ())
1246
+ if (first)
1247
+ first=false ;
1248
+ else
1238
1249
dest+=" , " ;
1239
1250
1240
- dest+=op ;
1251
+ dest+=op_str ;
1241
1252
}
1242
1253
1243
1254
dest+=' )' ;
@@ -2958,7 +2969,7 @@ std::string expr2ct::convert_code(
2958
2969
if (statement==" set_may" ||
2959
2970
statement==" set_must" )
2960
2971
return
2961
- indent_str (indent)+convert_function (src, id2string (statement), 16 )+" ;" ;
2972
+ indent_str (indent)+convert_function (src. operands () , id2string (statement), 16 )+" ;" ;
2962
2973
2963
2974
unsigned precedence;
2964
2975
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