Collapse nested conditionals.

This commit is contained in:
John Hood
2016-11-07 00:37:53 -05:00
parent 8ca8a54e11
commit 43785eb820
5 changed files with 59 additions and 75 deletions
+3 -4
View File
@@ -109,10 +109,9 @@ void Emulator::print( const Parser::Print *act )
this_cell->set_wide( chwidth == 2 ); /* chwidth had better be 1 or 2 here */
fb.apply_renditions_to_cell( this_cell );
if ( chwidth == 2 ) { /* erase overlapped cell */
if ( fb.ds.get_cursor_col() + 1 < fb.ds.get_width() ) {
fb.reset_cell( fb.get_mutable_cell( fb.ds.get_cursor_row(), fb.ds.get_cursor_col() + 1 ) );
}
if ( chwidth == 2
&& fb.ds.get_cursor_col() + 1 < fb.ds.get_width() ) { /* erase overlapped cell */
fb.reset_cell( fb.get_mutable_cell( fb.ds.get_cursor_row(), fb.ds.get_cursor_col() + 1 ) );
}
fb.ds.move_col( chwidth, true, true );