Skip to content

Commit cf4c317

Browse files
committed
Directly write to mstream instead of going via a string stream
1 parent 3d39a6f commit cf4c317

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed

src/goto-symex/symex_target_equation.cpp

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -407,9 +407,8 @@ void symex_target_equationt::convert_assignments(
407407
decision_procedure.conditional_output(
408408
decision_procedure.debug(),
409409
[&step](messaget::mstreamt &mstream) {
410-
std::ostringstream oss;
411-
step.output(oss);
412-
mstream << oss.str() << messaget::eom;
410+
step.output(mstream);
411+
mstream << messaget::eom;
413412
});
414413

415414
decision_procedure.set_to_true(step.cond_expr);
@@ -456,9 +455,8 @@ void symex_target_equationt::convert_guards(
456455
prop_conv.conditional_output(
457456
prop_conv.debug(),
458457
[&step](messaget::mstreamt &mstream) {
459-
std::ostringstream oss;
460-
step.output(oss);
461-
mstream << oss.str() << messaget::eom;
458+
step.output(mstream);
459+
mstream << messaget::eom;
462460
});
463461

464462
try
@@ -491,9 +489,8 @@ void symex_target_equationt::convert_assumptions(
491489
prop_conv.conditional_output(
492490
prop_conv.debug(),
493491
[&step](messaget::mstreamt &mstream) {
494-
std::ostringstream oss;
495-
step.output(oss);
496-
mstream << oss.str() << messaget::eom;
492+
step.output(mstream);
493+
mstream << messaget::eom;
497494
});
498495

499496
try
@@ -527,9 +524,8 @@ void symex_target_equationt::convert_goto_instructions(
527524
prop_conv.conditional_output(
528525
prop_conv.debug(),
529526
[&step](messaget::mstreamt &mstream) {
530-
std::ostringstream oss;
531-
step.output(oss);
532-
mstream << oss.str() << messaget::eom;
527+
step.output(mstream);
528+
mstream << messaget::eom;
533529
});
534530

535531
try
@@ -562,9 +558,8 @@ void symex_target_equationt::convert_constraints(
562558
decision_procedure.conditional_output(
563559
decision_procedure.debug(),
564560
[&step](messaget::mstreamt &mstream) {
565-
std::ostringstream oss;
566-
step.output(oss);
567-
mstream << oss.str() << messaget::eom;
561+
step.output(mstream);
562+
mstream << messaget::eom;
568563
});
569564

570565
try
@@ -626,9 +621,8 @@ void symex_target_equationt::convert_assertions(
626621
prop_conv.conditional_output(
627622
prop_conv.debug(),
628623
[&step](messaget::mstreamt &mstream) {
629-
std::ostringstream oss;
630-
step.output(oss);
631-
mstream << oss.str() << messaget::eom;
624+
step.output(mstream);
625+
mstream << messaget::eom;
632626
});
633627

634628
implies_exprt implication(

0 commit comments

Comments
 (0)