Backout rev 1.2 (workaround for gcc 2.60 expression evaluation

bug) as later versions of gcc have apparently this bug fixed.
This commit is contained in:
ru 2000-12-06 09:21:36 +00:00
parent 3e71b11e08
commit 35ab1437f2

View File

@ -197,11 +197,7 @@ static int scale_round(int n, int x, int y)
}
else {
if (-(unsigned)n <= (-(unsigned)INT_MIN - y2)/x)
{
// XXX simplify expression to work around bug in gcc-2.6.0
int tmp = n*x - y2;
return tmp/y;
}
return (n*x - y2)/y;
return int(n*double(x)/double(y) - .5);
}
}