1
0
Fork 0

(svn r17944) -Codechange (r11848): Removed the second counter variable that ran in sync with the first one.

release/1.0
alberth 2009-11-01 21:05:48 +00:00
parent a30633341c
commit 726edbf3c0
1 changed files with 1 additions and 3 deletions

View File

@ -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) 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(); DropDownList *list = new DropDownList();
for (uint i = 0; strings[i] != INVALID_STRING_ID; i++) { for (uint i = 0; strings[i] != INVALID_STRING_ID; i++) {
if (!HasBit(hidden_mask, 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? */ /* No entries in the list? */