From 1dbc0a20bed5cd85035b4f84a649c4f7386b07ab Mon Sep 17 00:00:00 2001 From: alberth Date: Fri, 25 Feb 2011 21:53:43 +0000 Subject: (svn r22144) -Codechange: Unify 'while (true)' to 'for (;;)' --- src/widget.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/widget.cpp') diff --git a/src/widget.cpp b/src/widget.cpp index 44bdb91d8..364403e30 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -1061,7 +1061,7 @@ void NWidgetHorizontal::SetupSmallestSize(Window *w, bool init_array) /* 1b. Make the container higher if needed to accomadate all childs nicely. */ uint max_smallest = this->smallest_y + 3 * max_vert_fill; // Upper limit to computing smallest height. uint cur_height = this->smallest_y; - while (true) { + for (;;) { for (NWidgetBase *child_wid = this->head; child_wid != NULL; child_wid = child_wid->next) { uint step_size = child_wid->GetVerticalStepSize(ST_SMALLEST); uint child_height = child_wid->smallest_y + child_wid->padding_top + child_wid->padding_bottom; @@ -1213,7 +1213,7 @@ void NWidgetVertical::SetupSmallestSize(Window *w, bool init_array) /* 1b. Make the container wider if needed to accomadate all childs nicely. */ uint max_smallest = this->smallest_x + 3 * max_hor_fill; // Upper limit to computing smallest height. uint cur_width = this->smallest_x; - while (true) { + for (;;) { for (NWidgetBase *child_wid = this->head; child_wid != NULL; child_wid = child_wid->next) { uint step_size = child_wid->GetHorizontalStepSize(ST_SMALLEST); uint child_width = child_wid->smallest_x + child_wid->padding_left + child_wid->padding_right; @@ -2538,7 +2538,7 @@ static int MakeWidgetTree(const NWidgetPart *parts, int count, NWidgetBase **par assert(*parent == NULL || (nwid_cont != NULL && nwid_parent == NULL) || (nwid_cont == NULL && nwid_parent != NULL)); int total_used = 0; - while (true) { + for (;;) { NWidgetBase *sub_widget = NULL; bool fill_sub = false; int num_used = MakeNWidget(parts, count - total_used, &sub_widget, &fill_sub, biggest_index); -- cgit v1.2.3-54-g00ecf