Fix a MSVC compilation error.
Explicitely cast to int so MSVC can determine the proper overload.
This commit is contained in:
parent
21c721cbc6
commit
cbfa9218f5
1 changed files with 1 additions and 1 deletions
|
@ -155,7 +155,7 @@ static void draw_line(
|
|||
// http://de.wikipedia.org/wiki/Bresenham-Algorithmus#Kompakte_Variante
|
||||
// version of 26.12.2010.
|
||||
const int dx = x2 - x1; // precondition x2 >= x1
|
||||
const int dy = abs(y2 - y1);
|
||||
const int dy = abs(static_cast<int>(y2 - y1));
|
||||
const int step_x = 1;
|
||||
const int step_y = y1 < y2 ? 1 : -1;
|
||||
int err = (dx > dy ? dx : -dy) / 2;
|
||||
|
|
Loading…
Add table
Reference in a new issue