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 @@ -1191,19 +1191,30 @@ std::string expr2ct::convert_function(
1191
1191
const exprt &src,
1192
1192
const std::string &name,
1193
1193
unsigned precedence)
1194
+ {
1195
+ return convert_function (src.operands (), name, precedence);
1196
+ }
1197
+
1198
+ std::string expr2ct::convert_function (
1199
+ const exprt::operandst &ops,
1200
+ const std::string &name,
1201
+ unsigned precedence)
1194
1202
{
1195
1203
std::string dest=name;
1196
1204
dest+=' (' ;
1205
+ bool first = true ;
1197
1206
1198
- forall_operands (it, src )
1207
+ for ( const auto &op : ops )
1199
1208
{
1200
1209
unsigned p;
1201
- std::string op =convert_with_precedence (*it , p);
1210
+ const std::string op_str =convert_with_precedence (op , p);
1202
1211
1203
- if (it!=src.operands ().begin ())
1212
+ if (first)
1213
+ first=false ;
1214
+ else
1204
1215
dest+=" , " ;
1205
1216
1206
- dest+=op ;
1217
+ dest+=op_str ;
1207
1218
}
1208
1219
1209
1220
dest+=' )' ;
@@ -2948,7 +2959,7 @@ std::string expr2ct::convert_code(
2948
2959
if (statement==" set_may" ||
2949
2960
statement==" set_must" )
2950
2961
return
2951
- indent_str (indent)+convert_function (src, id2string (statement), 16 )+" ;" ;
2962
+ indent_str (indent)+convert_function (src. operands () , id2string (statement), 16 )+" ;" ;
2952
2963
2953
2964
unsigned precedence;
2954
2965
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