apache /
qpid /
adf734ee29572f09465adc7d92caee4f96f1d074 QPID-6470: FieldValue::getFloatingPointValue() converts endian each time it is called.
When calling getFloatingPointValue multiple times, the octets are endian-converted each time.
Actually we need to make a copy first and then call convertIfRequired().
This fix is from a pull request by Pavel Pokutnev (see the JIRA).
commit 4ed0ce9c9b74b136c49735b19efb80489aa495a3
His original patch was correct, I made some additions:
- Added a unit test: qpid/cpp/src/tests/FieldValue.cpp
- Fixed some incorrect uses of "const" in nearby code.
- Replaced a for loop with std::copy, more readable and more optimizable.
There are still serious problems with float conversion shown up by the unit tests,
the relevant tests are commented out till these issues are fixed.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1671125 13f79535-47bb-0310-9956-ffa450edef68
5 files changed