@@ -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);
@@ -1354,12 +1354,12 @@ goto_programt::const_targett goto_program2codet::convert_start_thread(
13541354
13551355 // use pthreads if "code in new thread" is a function call to a function with
13561356 // suitable signature
1357- if (thread_start->is_function_call () &&
1358- to_code_function_call (to_code (thread_start->code )).arguments ().size ()==1 &&
1359- after_thread_start==thread_end)
1357+ if (
1358+ thread_start->is_function_call () &&
1359+ to_code_function_call (thread_start->code ).arguments ().size () == 1 &&
1360+ after_thread_start == thread_end)
13601361 {
1361- const code_function_callt &cf=
1362- to_code_function_call (to_code (thread_start->code ));
1362+ const code_function_callt &cf = to_code_function_call (thread_start->code );
13631363
13641364 system_headers.insert (" pthread.h" );
13651365
@@ -1730,14 +1730,15 @@ void goto_program2codet::cleanup_code_ifthenelse(
17301730
17311731 // assert(false) expands to if(true) assert(false), simplify again (and also
17321732 // simplify other cases)
1733- if (cond.is_true () &&
1734- (i_t_e.else_case ().is_nil () || !has_labels (to_code (i_t_e.else_case ()))))
1733+ if (
1734+ cond.is_true () &&
1735+ (i_t_e.else_case ().is_nil () || !has_labels (i_t_e.else_case ())))
17351736 {
17361737 codet tmp;
17371738 tmp.swap (i_t_e.then_case ());
17381739 code.swap (tmp);
17391740 }
1740- else if (cond.is_false () && !has_labels (to_code ( i_t_e.then_case () )))
1741+ else if (cond.is_false () && !has_labels (i_t_e.then_case ()))
17411742 {
17421743 if (i_t_e.else_case ().is_nil ())
17431744 code=code_skipt ();
@@ -1750,8 +1751,9 @@ void goto_program2codet::cleanup_code_ifthenelse(
17501751 }
17511752 else
17521753 {
1753- if (i_t_e.then_case ().is_not_nil () &&
1754- to_code (i_t_e.then_case ()).get_statement ()==ID_ifthenelse)
1754+ if (
1755+ i_t_e.then_case ().is_not_nil () &&
1756+ i_t_e.then_case ().get_statement () == ID_ifthenelse)
17551757 {
17561758 // we re-introduce 1-code blocks with if-then-else to avoid dangling-else
17571759 // ambiguity
@@ -1760,9 +1762,10 @@ void goto_program2codet::cleanup_code_ifthenelse(
17601762 i_t_e.then_case ().swap (b);
17611763 }
17621764
1763- 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)
1765+ if (
1766+ i_t_e.else_case ().is_not_nil () &&
1767+ i_t_e.then_case ().get_statement () == ID_skip &&
1768+ i_t_e.else_case ().get_statement () == ID_ifthenelse)
17661769 {
17671770 // we re-introduce 1-code blocks with if-then-else to avoid dangling-else
17681771 // ambiguity
@@ -1795,8 +1798,9 @@ void goto_program2codet::cleanup_code_ifthenelse(
17951798 }
17961799
17971800 // remove empty then/else
1798- if (code.get_statement ()==ID_ifthenelse &&
1799- to_code (i_t_e.then_case ()).get_statement ()==ID_skip)
1801+ if (
1802+ code.get_statement () == ID_ifthenelse &&
1803+ i_t_e.then_case ().get_statement () == ID_skip)
18001804 {
18011805 not_exprt tmp (i_t_e.cond ());
18021806 simplify (tmp, ns);
@@ -1805,15 +1809,15 @@ void goto_program2codet::cleanup_code_ifthenelse(
18051809 i_t_e.cond ().swap (tmp);
18061810 i_t_e.then_case ().swap (i_t_e.else_case ());
18071811 }
1808- if (code. get_statement ()==ID_ifthenelse &&
1809- i_t_e.else_case ().is_not_nil () &&
1810- to_code ( i_t_e.else_case ()) .get_statement ()== ID_skip)
1812+ if (
1813+ code. get_statement () == ID_ifthenelse && i_t_e.else_case ().is_not_nil () &&
1814+ i_t_e.else_case ().get_statement () == ID_skip)
18111815 i_t_e.else_case ().make_nil ();
18121816 // or even remove the if altogether if the then case is now empty
1813- if (code. get_statement ()==ID_ifthenelse &&
1814- i_t_e.else_case ().is_nil () &&
1815- (i_t_e.then_case ().is_nil () ||
1816- to_code ( i_t_e.then_case ()) .get_statement ()== ID_skip))
1817+ if (
1818+ code. get_statement () == ID_ifthenelse && i_t_e.else_case ().is_nil () &&
1819+ (i_t_e.then_case ().is_nil () ||
1820+ i_t_e.then_case ().get_statement () == ID_skip))
18171821 code=code_skipt ();
18181822}
18191823
0 commit comments