Skip to content

Commit bcab0a6

Browse files
committed
mouse_menu.d: Fix non-clear()-related build issues.
dmd can't implicitly cast size_t to uint on 64-bit.
1 parent 9fdaf4e commit bcab0a6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

examples/mouse_menu.d

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import std.string: toStringz;
32
import deimos.ncurses.ncurses;
43

@@ -83,7 +82,7 @@ void print_menu(WINDOW* menu_win, int highlight)
8382

8483
box(menu_win, 0, 0);
8584

86-
foreach(i, choice; choices)
85+
foreach(int i, choice; choices)
8786
{
8887
if(highlight == i + 1)
8988
wattron(menu_win, A_REVERSE);
@@ -100,7 +99,7 @@ int report_choice(int mouse_x, int mouse_y)
10099
int i = startx + 2;
101100
int j = starty + 3;
102101
int report = 0;
103-
foreach(choice, str; choices)
102+
foreach(int choice, str; choices)
104103
{
105104
if((mouse_y == j + choice) && (mouse_x >= i) && (mouse_x <= i+str.length))
106105
{

0 commit comments

Comments
 (0)