From 598da3b24b0f77fba7d62974395a5730244fe412 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Thu, 30 Apr 2020 00:25:17 -0700 Subject: [PATCH] Fixed -Wimplicit-int-float-conversion --- DirectXMesh/DirectXMeshOptimizeLRU.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DirectXMesh/DirectXMeshOptimizeLRU.cpp b/DirectXMesh/DirectXMeshOptimizeLRU.cpp index 820a9e68..fc4becc0 100644 --- a/DirectXMesh/DirectXMeshOptimizeLRU.cpp +++ b/DirectXMesh/DirectXMeshOptimizeLRU.cpp @@ -47,8 +47,8 @@ namespace else { // Points for being high in the cache. - const float scaler = 1.0f / (vertexCacheSize - 3); - score = 1.0f - (cachePosition - 3) * scaler; + const float scaler = 1.0f / float(vertexCacheSize - 3u); + score = 1.0f - float(cachePosition - 3u) * scaler; score = powf(score, FindVertexScore_CacheDecayPower); } }