eloraiby / delaunay

Relatively Robust Divide and Conquer 2D Delaunay Construction Algorithm in $O(n \log n)$
GNU Affero General Public License v3.0
126 stars 34 forks source link

Error in line 868 in delaunay.c file #5

Closed alex-panayiotou closed 9 years ago

alex-panayiotou commented 9 years ago

Hello, I am using your library for a project I am doing and I get an error at line 868 when I build the project. The error's message is: "Error 1 error C2440: '=' : cannot convert from 'void ' to 'del_point2d_t ' "

I fixed it by changing line 868 from: res->points = malloc(sizeof(del_point2d_t) * num_points); to: res->points = (del_point2d_t)malloc(sizeof(del_point2d_t) \ num_points); and it seemed to work. It's weird how no one else had this error before, so I am not sure if I did something wrong or not. I am using Visual Studio 2012 on Windows 8 64bit.

Regards, Alex

eloraiby commented 9 years ago

Probably most of them use gcc/clang/mingw32, the error fix for msvc is correct. I ll do more checks once I have access to an msvc compiler.