diff --git a/include/ignition/math/Helpers.hh b/include/ignition/math/Helpers.hh index 119440db5..504ce381f 100644 --- a/include/ignition/math/Helpers.hh +++ b/include/ignition/math/Helpers.hh @@ -478,6 +478,18 @@ namespace ignition } } + /// \brief Append a number to a stream, specialized for int. + /// \param[out] _out Output stream. + /// \param[in] _number Number to append. + /// _precision Not used for int. + /// \deprecated Use appendToStream(std::ostream, int) instead. + template<> + inline void IGN_DEPRECATED(7) appendToStream( + std::ostream &_out, int _number, int) + { + _out << _number; + } + /// \brief Append a number to a stream. Makes sure "-0" is returned as "0". /// \param[out] _out Output stream. /// \param[in] _number Number to append. @@ -497,9 +509,8 @@ namespace ignition /// \brief Append a number to a stream, specialized for int. /// \param[out] _out Output stream. /// \param[in] _number Number to append. - // _precision Not used for int. template<> - inline void appendToStream(std::ostream &_out, int _number, int) + inline void appendToStream(std::ostream &_out, int _number) { _out << _number; } diff --git a/src/OrientedBox_TEST.cc b/src/OrientedBox_TEST.cc index 529225e56..774461fec 100644 --- a/src/OrientedBox_TEST.cc +++ b/src/OrientedBox_TEST.cc @@ -328,11 +328,11 @@ TEST(OrientedBoxTest, ContainsOrientedRotation) TEST(OrientedBoxTest, OperatorStreamOut) { OrientedBoxd b(Vector3d(0.1, 1.2, 2.3), - Pose3d(3.4, 4.5, 5.6, 0.0, -0.1, 0.2)); + Pose3d(3.4, 4.5, 5.6, 0.1, -0.1, 0.2)); std::ostringstream stream; stream << b; EXPECT_EQ(stream.str(), - "Size[0.1 1.2 2.3] Pose[3.4 4.5 5.6 0 -0.1 0.2] Material[]"); + "Size[0.1 1.2 2.3] Pose[3.4 4.5 5.6 0.1 -0.1 0.2] Material[]"); } //////////////////////////////////////////////////