Skip to content

Commit

Permalink
Fix PVS-Studio warning №V519
Browse files Browse the repository at this point in the history
V519 The 'MaxT[0]' variable is assigned values twice successively.
Perhaps this is a mistake.
  • Loading branch information
Xottab-DUTY committed Dec 24, 2017
1 parent c1e0f24 commit 19aa7c8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/xrCore/_fbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -395,14 +395,14 @@ class _box3
{
coord[0] = vMin[0];
Inside = false;
if (IntRref(dir[0])) MaxT[0] = (vMin[0] - origin[0]) / dir[0]; // Calculate T distances to candidate planes
if (IntRref(dir[0]))
MaxT[0] = (vMin[0] - origin[0]) / dir[0]; // Calculate T distances to candidate planes
}
else if (origin[0] > vMax[0])
{
coord[0] = vMax[0];
Inside = false;
if (IntRref(dir[0])) MaxT[0] = (vMax[0] - origin[0]) / dir[0]; // Calculate T distances to candidate planes
if (IntRref(dir[0]))
MaxT[0] = (vMax[0] - origin[0]) / dir[0]; // Calculate T distances to candidate planes
}
}
Expand All @@ -411,14 +411,14 @@ class _box3
{
coord[1] = vMin[1];
Inside = false;
if (IntRref(dir[1])) MaxT[1] = (vMin[1] - origin[1]) / dir[1]; // Calculate T distances to candidate planes
if (IntRref(dir[1]))
MaxT[1] = (vMin[1] - origin[1]) / dir[1]; // Calculate T distances to candidate planes
}
else if (origin[1] > vMax[1])
{
coord[1] = vMax[1];
Inside = false;
if (IntRref(dir[1])) MaxT[1] = (vMax[1] - origin[1]) / dir[1]; // Calculate T distances to candidate planes
if (IntRref(dir[1]))
MaxT[1] = (vMax[1] - origin[1]) / dir[1]; // Calculate T distances to candidate planes
}
}
Expand All @@ -427,14 +427,14 @@ class _box3
{
coord[2] = vMin[2];
Inside = false;
if (IntRref(dir[2])) MaxT[2] = (vMin[2] - origin[2]) / dir[2]; // Calculate T distances to candidate planes
if (IntRref(dir[2]))
MaxT[2] = (vMin[2] - origin[2]) / dir[2]; // Calculate T distances to candidate planes
}
else if (origin[2] > vMax[2])
{
coord[2] = vMax[2];
Inside = false;
if (IntRref(dir[2])) MaxT[2] = (vMax[2] - origin[2]) / dir[2]; // Calculate T distances to candidate planes
if (IntRref(dir[2]))
MaxT[2] = (vMax[2] - origin[2]) / dir[2]; // Calculate T distances to candidate planes
}
}
Expand Down

0 comments on commit 19aa7c8

Please sign in to comment.