1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-21 04:39:42 +00:00

Replace C-style cast by static_cast

This commit is contained in:
elsid 2023-08-01 20:49:08 +02:00
parent e4584ce5dd
commit d3e61e4578
No known key found for this signature in database
GPG key ID: 4DE04C198CBA7625

View file

@ -266,8 +266,9 @@ namespace ESMTerrain
height = heightData->getHeights()[col * landSize + row];
if (alteration)
height += getAlteredHeight(col, row);
positions[vertIndex] = osg::Vec3f((vertX / float(numVerts - 1) - 0.5f) * size * landSizeInUnits,
(vertY / float(numVerts - 1) - 0.5f) * size * landSizeInUnits, height);
positions[vertIndex]
= osg::Vec3f((vertX / static_cast<float>(numVerts - 1) - 0.5f) * size * landSizeInUnits,
(vertY / static_cast<float>(numVerts - 1) - 0.5f) * size * landSizeInUnits, height);
osg::Vec3f normal(0, 0, 1);