mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-16 18:31:32 +00:00
Limit variable scope.
Issue found by cppcheck.
This commit is contained in:
parent
f33f15ef77
commit
2042d7732e
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user