summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-11-01 21:05:48 +0000
committeralberth <alberth@openttd.org>2009-11-01 21:05:48 +0000
commit726edbf3c040581e21819fc3adbb9ed19dc3e952 (patch)
tree7c563362821bf5ffd21545889a33e68a65f79b87 /src
parenta30633341c8b0edf880975e41bcb3d7e4ca2aa9b (diff)
downloadopenttd-726edbf3c040581e21819fc3adbb9ed19dc3e952.tar.xz
(svn r17944) -Codechange (r11848): Removed the second counter variable that ran in sync with the first one.
Diffstat (limited to 'src')
-rw-r--r--src/widgets/dropdown.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp
index 094e431e4..9aeca7243 100644
--- a/src/widgets/dropdown.cpp
+++ b/src/widgets/dropdown.cpp
@@ -392,14 +392,12 @@ void ShowDropDownList(Window *w, DropDownList *list, int selected, int button, u
*/
void ShowDropDownMenu(Window *w, const StringID *strings, int selected, int button, uint32 disabled_mask, uint32 hidden_mask, uint width)
{
- uint result = 0;
DropDownList *list = new DropDownList();
for (uint i = 0; strings[i] != INVALID_STRING_ID; i++) {
if (!HasBit(hidden_mask, i)) {
- list->push_back(new DropDownListStringItem(strings[i], result, HasBit(disabled_mask, i)));
+ list->push_back(new DropDownListStringItem(strings[i], i, HasBit(disabled_mask, i)));
}
- result++;
}
/* No entries in the list? */