Limit variable scope.

Issue found by cppcheck.
This commit is contained in:
Mark de Wever 2012-09-23 20:08:26 +00:00
parent f33f15ef77
commit 2042d7732e

View File

@ -308,15 +308,15 @@ void show_about(display &disp, const std::string &campaign)
update_rect(text_rect);
}
const int line_spacing = 5;
int y = text_rect.y - offset;
int line = startline;
max_text_width = 0;
{
// clip to keep text into the frame (thus the new code block)
clip_rect_setter set_clip_rect(screen, &text_rect);
// clip to keep text into the frame (thus the new code block)
clip_rect_setter set_clip_rect(screen, &text_rect);
const int line_spacing = 5;
do {
// draw the text (with ellipsis if needed)
// update the max_text_width for future cleaning