From 7b873ce0bc3598f98ee2ed72a83450139099101d Mon Sep 17 00:00:00 2001 From: belugas Date: Tue, 17 Jun 2008 02:25:45 +0000 Subject: (svn r13540) -Codechange: Less a magic number and a more adaptable code --- src/toolbar_gui.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index 2dcf6b408..cd892cec3 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -1099,8 +1099,7 @@ public: } uint extra_spacing_at[] = { 3, 4, 7, 8, 10, 16, 0 }; - /* Yes, it defines about 27 widgets for this toolbar */ - for (uint i = 0, x = 0, j = 0, b = 0; i < 27; i++) { + for (uint i = 0, x = 0, j = 0, b = 0; i < this->widget_count; i++) { switch (i) { case 4: this->widget[i].left = x; -- cgit v1.2.3-54-g00ecf