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 @@ -1222,19 +1222,30 @@ std::string expr2ct::convert_function(
1222
1222
const exprt &src,
1223
1223
const std::string &name,
1224
1224
unsigned precedence)
1225
+ {
1226
+ return convert_function (src.operands (), name, precedence);
1227
+ }
1228
+
1229
+ std::string expr2ct::convert_function (
1230
+ const exprt::operandst &ops,
1231
+ const std::string &name,
1232
+ unsigned precedence)
1225
1233
{
1226
1234
std::string dest=name;
1227
1235
dest+=' (' ;
1236
+ bool first = true ;
1228
1237
1229
- forall_operands (it, src )
1238
+ for ( const auto &op : ops )
1230
1239
{
1231
1240
unsigned p;
1232
- std::string op =convert_with_precedence (*it , p);
1241
+ const std::string op_str =convert_with_precedence (op , p);
1233
1242
1234
- if (it!=src.operands ().begin ())
1243
+ if (first)
1244
+ first=false ;
1245
+ else
1235
1246
dest+=" , " ;
1236
1247
1237
- dest+=op ;
1248
+ dest+=op_str ;
1238
1249
}
1239
1250
1240
1251
dest+=' )' ;
@@ -2956,7 +2967,7 @@ std::string expr2ct::convert_code(
2956
2967
if (statement==" set_may" ||
2957
2968
statement==" set_must" )
2958
2969
return
2959
- indent_str (indent)+convert_function (src, id2string (statement), 16 )+" ;" ;
2970
+ indent_str (indent)+convert_function (src. operands () , id2string (statement), 16 )+" ;" ;
2960
2971
2961
2972
unsigned precedence;
2962
2973
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