Fixed float->int16 conversion warnings in VS2013.

This commit is contained in:
Andrew Woloszyn 2016-03-07 15:55:44 -05:00
parent f7e63786a9
commit 9dd1cd7f31
2 changed files with 2 additions and 2 deletions

View File

@ -1092,7 +1092,7 @@ using ParseNormalFloat16Test =
TEST_P(ParseNormalFloat16Test, Samples) {
std::stringstream input(GetParam().literal);
HexFloat<FloatProxy<Float16>> parsed_value(0.0f);
HexFloat<FloatProxy<Float16>> parsed_value(0);
ParseNormalFloat(input, GetParam().negate_value, parsed_value);
EXPECT_NE(GetParam().expect_success, input.fail())
<< " literal: " << GetParam().literal

View File

@ -513,7 +513,7 @@ TEST(AssemblyContextParseFloat16, Overflow) {
// on floating point.
AssemblyContext context(AutoText(""), nullptr);
const spv_result_t ec = SPV_FAILED_MATCH;
spvutils::HexFloat<spvutils::FloatProxy<spvutils::Float16>> f(0.0f);
spvutils::HexFloat<spvutils::FloatProxy<spvutils::Float16>> f(0);
EXPECT_EQ(SPV_SUCCESS, context.parseNumber("-0.0", ec, &f, ""));
EXPECT_EQ(uint16_t{0x8000}, f.value().getAsFloat().get_value());