summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorCharles E. Rolke <chug@apache.org>2015-05-12 17:31:20 +0000
committerCharles E. Rolke <chug@apache.org>2015-05-12 17:31:20 +0000
commitd8dac2ae30a0ed7979c22bb4bb06dbdfa4a35bbe (patch)
tree189af20b548b99a64b826d5982fd8e09a53c85bc /cpp
parent65ce805849416f2f2df67289c568ce6be5d0c61d (diff)
downloadqpid-python-d8dac2ae30a0ed7979c22bb4bb06dbdfa4a35bbe.tar.gz
QPID-6537: [Windows warning] avoid implicit conversion double->float
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1679012 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/tests/FieldValue.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/src/tests/FieldValue.cpp b/cpp/src/tests/FieldValue.cpp
index c70736962c..9cea48e3cf 100644
--- a/cpp/src/tests/FieldValue.cpp
+++ b/cpp/src/tests/FieldValue.cpp
@@ -30,7 +30,7 @@ using namespace qpid::framing;
Str16Value s("abc");
IntegerValue i(42);
-FloatValue f(42.42);
+FloatValue f((float)42.42);
DoubleValue df(123.123);
QPID_AUTO_TEST_CASE(testStr16ValueEquals)
@@ -62,10 +62,10 @@ QPID_AUTO_TEST_CASE(testIntegerValueEquals)
QPID_AUTO_TEST_CASE(testFloatValueEquals)
{
BOOST_CHECK(f.convertsTo<float>() == true);
- BOOST_CHECK(FloatValue(42.42) == f);
+ BOOST_CHECK(FloatValue((float)42.42) == f);
BOOST_CHECK_CLOSE(double(f.get<float>()), 42.42, 0.001);
// Check twice, regression test for QPID-6470 where the value was corrupted during get.
- BOOST_CHECK(FloatValue(42.42) == f);
+ BOOST_CHECK(FloatValue((float)42.42) == f);
BOOST_CHECK_CLOSE(f.get<double>(), 42.42, 0.001);
// Float to double conversion