Skip to content

Commit

Permalink
Corrected issue with compiling on 64bit. Hackish fix.
Browse files Browse the repository at this point in the history
size_t changes with architecture, on my 64bit compile it was a ulong, but the underlying libs just use int and uint.  Chose int because it can automatically be cast to uint losslessly, but the reverse isn't true.

A full correct fix would be to dig through the code replacing all non-pointer uses of size_t with the correct integer type.  That's just outside of my current time limits to fix this.
  • Loading branch information
Ricky Curtice committed Aug 7, 2014
1 parent 85c2cab commit d5eae0c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dmagick/internal/Windows.d
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class Window
Image image;
Image[] imageList;
size_t index;
size_t height;
size_t width;
int height;
int width;

WNDCLASS wndclass;
HINSTANCE hInstance;
Expand All @@ -35,8 +35,8 @@ class Window
{
this.image = image;

height = image.rows;
width = image.columns;
height = cast(int)image.rows;
width = cast(int)image.columns;

hInstance = cast(HINSTANCE) GetModuleHandleA(null);

Expand Down

0 comments on commit d5eae0c

Please sign in to comment.