Fix some errors produced by clang
This commit is contained in:
parent
f812d7194b
commit
31fcb1bfaa
@ -240,7 +240,7 @@ void Air::update_air(void)
|
||||
if ((dx*advDistanceMult>1.0f || dy*advDistanceMult>1.0f) && (tx>=2 && tx<XRES/CELL-2 && ty>=2 && ty<YRES/CELL-2))
|
||||
{
|
||||
// Trying to take velocity from far away, check whether there is an intervening wall. Step from current position to desired source location, looking for walls, with either the x or y step size being 1 cell
|
||||
if (abs(dx)>abs(dy))
|
||||
if (std::abs(dx)>std::abs(dy))
|
||||
{
|
||||
stepX = (dx<0.0f) ? 1 : -1;
|
||||
stepY = -dy/fabsf(dx);
|
||||
|
@ -239,7 +239,7 @@ int Element_LIGH::LIGH_nearest_part(Simulation * sim, int ci, int max_d)
|
||||
{
|
||||
if (sim->parts[i].type && sim->parts[i].life && i!=ci && sim->parts[i].type!=PT_LIGH && sim->parts[i].type!=PT_THDR && sim->parts[i].type!=PT_NEUT && sim->parts[i].type!=PT_PHOT)
|
||||
{
|
||||
ndistance = abs(cx-sim->parts[i].x)+abs(cy-sim->parts[i].y);// Faster but less accurate Older: sqrt(pow(cx-parts[i].x, 2)+pow(cy-parts[i].y, 2));
|
||||
ndistance = std::abs(cx-sim->parts[i].x)+std::abs(cy-sim->parts[i].y);// Faster but less accurate Older: sqrt(pow(cx-parts[i].x, 2)+pow(cy-parts[i].y, 2));
|
||||
if (ndistance<distance)
|
||||
{
|
||||
distance = ndistance;
|
||||
|
Loading…
Reference in New Issue
Block a user