From a01830f8f858ec6398b79bd865acce01975e5c6e Mon Sep 17 00:00:00 2001 From: David Rowe Date: Fri, 22 May 2015 12:32:02 -0700 Subject: [PATCH] Fix some double to float conversion warnings in Windows builds --- libraries/entities-renderer/src/EntityTreeRenderer.cpp | 2 +- .../entities-renderer/src/RenderableWebEntityItem.cpp | 4 ++-- tools/vhacd-util/src/VHACDUtilApp.cpp | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libraries/entities-renderer/src/EntityTreeRenderer.cpp b/libraries/entities-renderer/src/EntityTreeRenderer.cpp index 7bc253d00a..c47c24f20a 100644 --- a/libraries/entities-renderer/src/EntityTreeRenderer.cpp +++ b/libraries/entities-renderer/src/EntityTreeRenderer.cpp @@ -1175,7 +1175,7 @@ void EntityTreeRenderer::entityCollisionWithEntity(const EntityItemID& idA, cons return; } // Don't respond to small continuous contacts. - const float COLLISION_MINUMUM_PENETRATION = 0.005; + const float COLLISION_MINUMUM_PENETRATION = 0.005f; if ((collision.type != CONTACT_EVENT_TYPE_START) && (glm::length(collision.penetration) < COLLISION_MINUMUM_PENETRATION)) { return; } diff --git a/libraries/entities-renderer/src/RenderableWebEntityItem.cpp b/libraries/entities-renderer/src/RenderableWebEntityItem.cpp index f416fff744..1f71e10d4e 100644 --- a/libraries/entities-renderer/src/RenderableWebEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableWebEntityItem.cpp @@ -25,8 +25,8 @@ #include "EntityTreeRenderer.h" -const float DPI = 30.47; -const float METERS_TO_INCHES = 39.3701; +const float DPI = 30.47f; +const float METERS_TO_INCHES = 39.3701f; EntityItem* RenderableWebEntityItem::factory(const EntityItemID& entityID, const EntityItemProperties& properties) { return new RenderableWebEntityItem(entityID, properties); diff --git a/tools/vhacd-util/src/VHACDUtilApp.cpp b/tools/vhacd-util/src/VHACDUtilApp.cpp index 46e1898979..ed4dab020f 100644 --- a/tools/vhacd-util/src/VHACDUtilApp.cpp +++ b/tools/vhacd-util/src/VHACDUtilApp.cpp @@ -255,27 +255,27 @@ VHACDUtilApp::VHACDUtilApp(int argc, char* argv[]) : vHacdDepth = parser.value(vHacdDepthOption).toInt(); } - float vHacdAlpha = 0.05; + float vHacdAlpha = 0.05f; if (parser.isSet(vHacdAlphaOption)) { vHacdAlpha = parser.value(vHacdAlphaOption).toFloat(); } - float vHacdBeta = 0.05; + float vHacdBeta = 0.05f; if (parser.isSet(vHacdBetaOption)) { vHacdBeta = parser.value(vHacdBetaOption).toFloat(); } - float vHacdGamma = 0.00125; + float vHacdGamma = 0.00125f; if (parser.isSet(vHacdGammaOption)) { vHacdGamma = parser.value(vHacdGammaOption).toFloat(); } - float vHacdDelta = 0.05; + float vHacdDelta = 0.05f; if (parser.isSet(vHacdDeltaOption)) { vHacdDelta = parser.value(vHacdDeltaOption).toFloat(); } - float vHacdConcavity = 0.0025; + float vHacdConcavity = 0.0025f; if (parser.isSet(vHacdConcavityOption)) { vHacdConcavity = parser.value(vHacdConcavityOption).toFloat(); }