From 9dd1cd7f31779dc60ac49d550ec4c164b2fd7be4 Mon Sep 17 00:00:00 2001 From: Andrew Woloszyn Date: Mon, 7 Mar 2016 15:55:44 -0500 Subject: [PATCH] Fixed float->int16 conversion warnings in VS2013. --- test/HexFloat.cpp | 2 +- test/TextToBinary.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/HexFloat.cpp b/test/HexFloat.cpp index 1c783cd2a..4afa7387f 100644 --- a/test/HexFloat.cpp +++ b/test/HexFloat.cpp @@ -1092,7 +1092,7 @@ using ParseNormalFloat16Test = TEST_P(ParseNormalFloat16Test, Samples) { std::stringstream input(GetParam().literal); - HexFloat> parsed_value(0.0f); + HexFloat> parsed_value(0); ParseNormalFloat(input, GetParam().negate_value, parsed_value); EXPECT_NE(GetParam().expect_success, input.fail()) << " literal: " << GetParam().literal diff --git a/test/TextToBinary.cpp b/test/TextToBinary.cpp index 6dc890239..182dcf5a6 100644 --- a/test/TextToBinary.cpp +++ b/test/TextToBinary.cpp @@ -513,7 +513,7 @@ TEST(AssemblyContextParseFloat16, Overflow) { // on floating point. AssemblyContext context(AutoText(""), nullptr); const spv_result_t ec = SPV_FAILED_MATCH; - spvutils::HexFloat> f(0.0f); + spvutils::HexFloat> f(0); EXPECT_EQ(SPV_SUCCESS, context.parseNumber("-0.0", ec, &f, "")); EXPECT_EQ(uint16_t{0x8000}, f.value().getAsFloat().get_value());