@@ -1117,17 +1117,17 @@ goto_programt::const_targett goto_program2codet::convert_goto_if(
11171117 if (has_else)
11181118 {
11191119 for (++target; target!=before_else; ++target)
1120- target=convert_instruction (target, before_else, to_code ( i.then_case () ));
1120+ target=convert_instruction (target, before_else, i.then_case ());
11211121
1122- convert_labels (before_else, to_code ( i.then_case () ));
1122+ convert_labels (before_else, i.then_case ());
11231123
11241124 for (++target; target!=end_if; ++target)
1125- target=convert_instruction (target, end_if, to_code ( i.else_case () ));
1125+ target=convert_instruction (target, end_if, i.else_case ());
11261126 }
11271127 else
11281128 {
11291129 for (++target; target!=end_if; ++target)
1130- target=convert_instruction (target, end_if, to_code ( i.then_case () ));
1130+ target=convert_instruction (target, end_if, i.then_case ());
11311131 }
11321132
11331133 dest.move_to_operands (i);
@@ -1355,11 +1355,11 @@ goto_programt::const_targett goto_program2codet::convert_start_thread(
13551355 // use pthreads if "code in new thread" is a function call to a function with
13561356 // suitable signature
13571357 if (thread_start->is_function_call () &&
1358- to_code_function_call (to_code ( thread_start->code ) ).arguments ().size ()==1 &&
1358+ to_code_function_call (thread_start->code ).arguments ().size ()==1 &&
13591359 after_thread_start==thread_end)
13601360 {
13611361 const code_function_callt &cf=
1362- to_code_function_call (to_code ( thread_start->code ) );
1362+ to_code_function_call (thread_start->code );
13631363
13641364 system_headers.insert (" pthread.h" );
13651365
@@ -1731,13 +1731,13 @@ void goto_program2codet::cleanup_code_ifthenelse(
17311731 // assert(false) expands to if(true) assert(false), simplify again (and also
17321732 // simplify other cases)
17331733 if (cond.is_true () &&
1734- (i_t_e.else_case ().is_nil () || !has_labels (to_code ( i_t_e.else_case () ))))
1734+ (i_t_e.else_case ().is_nil () || !has_labels (i_t_e.else_case ())))
17351735 {
17361736 codet tmp;
17371737 tmp.swap (i_t_e.then_case ());
17381738 code.swap (tmp);
17391739 }
1740- else if (cond.is_false () && !has_labels (to_code ( i_t_e.then_case () )))
1740+ else if (cond.is_false () && !has_labels (i_t_e.then_case ()))
17411741 {
17421742 if (i_t_e.else_case ().is_nil ())
17431743 code=code_skipt ();
@@ -1751,7 +1751,7 @@ void goto_program2codet::cleanup_code_ifthenelse(
17511751 else
17521752 {
17531753 if (i_t_e.then_case ().is_not_nil () &&
1754- to_code ( i_t_e.then_case () ).get_statement ()==ID_ifthenelse)
1754+ i_t_e.then_case ().get_statement ()==ID_ifthenelse)
17551755 {
17561756 // we re-introduce 1-code blocks with if-then-else to avoid dangling-else
17571757 // ambiguity
@@ -1761,8 +1761,8 @@ void goto_program2codet::cleanup_code_ifthenelse(
17611761 }
17621762
17631763 if (i_t_e.else_case ().is_not_nil () &&
1764- to_code ( i_t_e.then_case () ).get_statement ()==ID_skip &&
1765- to_code ( i_t_e.else_case () ).get_statement ()==ID_ifthenelse)
1764+ i_t_e.then_case ().get_statement ()==ID_skip &&
1765+ i_t_e.else_case ().get_statement ()==ID_ifthenelse)
17661766 {
17671767 // we re-introduce 1-code blocks with if-then-else to avoid dangling-else
17681768 // ambiguity
@@ -1796,7 +1796,7 @@ void goto_program2codet::cleanup_code_ifthenelse(
17961796
17971797 // remove empty then/else
17981798 if (code.get_statement ()==ID_ifthenelse &&
1799- to_code ( i_t_e.then_case () ).get_statement ()==ID_skip)
1799+ i_t_e.then_case ().get_statement ()==ID_skip)
18001800 {
18011801 not_exprt tmp (i_t_e.cond ());
18021802 simplify (tmp, ns);
@@ -1807,13 +1807,13 @@ void goto_program2codet::cleanup_code_ifthenelse(
18071807 }
18081808 if (code.get_statement ()==ID_ifthenelse &&
18091809 i_t_e.else_case ().is_not_nil () &&
1810- to_code ( i_t_e.else_case () ).get_statement ()==ID_skip)
1810+ i_t_e.else_case ().get_statement ()==ID_skip)
18111811 i_t_e.else_case ().make_nil ();
18121812 // or even remove the if altogether if the then case is now empty
18131813 if (code.get_statement ()==ID_ifthenelse &&
18141814 i_t_e.else_case ().is_nil () &&
18151815 (i_t_e.then_case ().is_nil () ||
1816- to_code ( i_t_e.then_case () ).get_statement ()==ID_skip))
1816+ i_t_e.then_case ().get_statement ()==ID_skip))
18171817 code=code_skipt ();
18181818}
18191819
0 commit comments