mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-30 00:36:39 +00:00
Fix coverity warning
CID 332936 (#1 of 1): Result is not floating-point (UNINTENDED_INTEGER_DIVISION) integer_division: Dividing integer expressions size and 2, and then converting the integer quotient to type float. Any remainder, or fractional part of the quotient, is ignored.
This commit is contained in:
parent
7cc58fa20d
commit
ee63ee9d93
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ namespace DetourNavigator
|
|||
|
||||
TileBounds maxCellTileBounds(int size, const osg::Vec3f& shift)
|
||||
{
|
||||
const float halfCellSize = size / 2;
|
||||
const float halfCellSize = static_cast<float>(size) / 2;
|
||||
return TileBounds {
|
||||
osg::Vec2f(shift.x() - halfCellSize, shift.y() - halfCellSize),
|
||||
osg::Vec2f(shift.x() + halfCellSize, shift.y() + halfCellSize)
|
||||
|
|
Loading…
Reference in a new issue