Fix compilation warnings under Clang 10

This commit is contained in:
Wojtek Figat
2021-02-23 23:28:28 +01:00
parent c0f81a6f0a
commit a21d1a91fc
2 changed files with 2 additions and 2 deletions

View File

@@ -484,7 +484,7 @@ public:
/// </summary> /// </summary>
API_PROPERTY() FORCE_INLINE float GetPerInstanceRandom() const API_PROPERTY() FORCE_INLINE float GetPerInstanceRandom() const
{ {
return _id.C * (1.0f / MAX_uint32); return _id.C * (1.0f / (float)MAX_uint32);
} }
/// <summary> /// <summary>

View File

@@ -20,7 +20,7 @@ void TerrainChunk::Init(TerrainPatch* patch, uint16 x, uint16 z)
_yOffset = 0; _yOffset = 0;
_yHeight = 1; _yHeight = 1;
_heightmapUVScaleBias = Vector4(1.0f, 1.0f, _x, _z) * (1.0f / TerrainPatch::CHUNKS_COUNT_EDGE); _heightmapUVScaleBias = Vector4(1.0f, 1.0f, _x, _z) * (1.0f / TerrainPatch::CHUNKS_COUNT_EDGE);
_perInstanceRandom = (_patch->_terrain->_id.C ^ _x ^ _z) * (1.0f / MAX_uint32); _perInstanceRandom = (_patch->_terrain->_id.C ^ _x ^ _z) * (1.0f / (float)MAX_uint32);
OverrideMaterial = nullptr; OverrideMaterial = nullptr;
} }