qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1679012 - /qpid/trunk/qpid/cpp/src/tests/FieldValue.cpp
Date Tue, 12 May 2015 17:31:20 GMT
Author: chug
Date: Tue May 12 17:31:20 2015
New Revision: 1679012

URL: http://svn.apache.org/r1679012
Log:
QPID-6537: [Windows warning] avoid implicit conversion double->float


Modified:
    qpid/trunk/qpid/cpp/src/tests/FieldValue.cpp

Modified: qpid/trunk/qpid/cpp/src/tests/FieldValue.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/FieldValue.cpp?rev=1679012&r1=1679011&r2=1679012&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/FieldValue.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/FieldValue.cpp Tue May 12 17:31:20 2015
@@ -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(testIntegerValueEqua
 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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message