From b257c881b59536bede4b3b1f455c02ef4ea45c53 Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Tue, 28 Oct 2014 10:36:09 -0400 Subject: [PATCH] explicit casts help mitigate MSVC warnery --- DataStructures/JSONContainer.h | 2 +- DataStructures/StaticRTree.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DataStructures/JSONContainer.h b/DataStructures/JSONContainer.h index 350441d12..39e532fb6 100644 --- a/DataStructures/JSONContainer.h +++ b/DataStructures/JSONContainer.h @@ -56,7 +56,7 @@ struct String struct Number { Number() {} - Number(double value) : value(value) {} + Number(double value) : value(static_cast(value)) {} double value; }; diff --git a/DataStructures/StaticRTree.h b/DataStructures/StaticRTree.h index b02a541b5..39f3f2cfd 100644 --- a/DataStructures/StaticRTree.h +++ b/DataStructures/StaticRTree.h @@ -1121,11 +1121,11 @@ class StaticRTree if (SPECIAL_NODEID != result_phantom_node.forward_node_id) { - result_phantom_node.forward_weight *= ratio; + result_phantom_node.forward_weight *= static_cast(ratio); } if (SPECIAL_NODEID != result_phantom_node.reverse_node_id) { - result_phantom_node.reverse_weight *= (1.f - ratio); + result_phantom_node.reverse_weight *= static_cast(1.f - ratio); } }