Do not set function parameters.
This commit is contained in:
@@ -313,21 +313,21 @@ void Framebuffer::insert_line( int before_row, int count )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int max_scroll = ds.get_scrolling_region_bottom_row() + 1 - before_row;
|
int scroll = ds.get_scrolling_region_bottom_row() + 1 - before_row;
|
||||||
if ( count > max_scroll ) {
|
if ( count < scroll ) {
|
||||||
count = max_scroll;
|
scroll = count;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( count == 0 ) {
|
if ( scroll == 0 ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// delete old rows
|
// delete old rows
|
||||||
rows_type::iterator start = rows.begin() + ds.get_scrolling_region_bottom_row() + 1 - count;
|
rows_type::iterator start = rows.begin() + ds.get_scrolling_region_bottom_row() + 1 - scroll;
|
||||||
rows.erase( start, start + count );
|
rows.erase( start, start + scroll );
|
||||||
// insert new rows
|
// insert new rows
|
||||||
start = rows.begin() + before_row;
|
start = rows.begin() + before_row;
|
||||||
rows.insert( start, count, newrow());
|
rows.insert( start, scroll, newrow());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Framebuffer::delete_line( int row, int count )
|
void Framebuffer::delete_line( int row, int count )
|
||||||
@@ -337,21 +337,21 @@ void Framebuffer::delete_line( int row, int count )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int max_scroll = ds.get_scrolling_region_bottom_row() + 1 - row;
|
int scroll = ds.get_scrolling_region_bottom_row() + 1 - row;
|
||||||
if ( count > max_scroll ) {
|
if ( count < scroll ) {
|
||||||
count = max_scroll;
|
scroll = count;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( count == 0 ) {
|
if ( scroll == 0 ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// delete old rows
|
// delete old rows
|
||||||
rows_type::iterator start = rows.begin() + row;
|
rows_type::iterator start = rows.begin() + row;
|
||||||
rows.erase( start, start + count );
|
rows.erase( start, start + scroll );
|
||||||
// insert a block of dummy rows
|
// insert a block of dummy rows
|
||||||
start = rows.begin() + ds.get_scrolling_region_bottom_row() + 1 - count;
|
start = rows.begin() + ds.get_scrolling_region_bottom_row() + 1 - scroll;
|
||||||
rows.insert( start, count, newrow());
|
rows.insert( start, scroll, newrow());
|
||||||
}
|
}
|
||||||
|
|
||||||
Row::Row( const size_t s_width, const color_type background_color )
|
Row::Row( const size_t s_width, const color_type background_color )
|
||||||
|
|||||||
Reference in New Issue
Block a user