portability fix for pow overload resolution

On Solaris the compiler is missing the template overload.
This commit is contained in:
Carl Lei 2016-06-25 18:51:10 +08:00 committed by Lei Siao
parent 6d71b73063
commit 55aba43078
1 changed files with 3 additions and 3 deletions

View File

@ -108,7 +108,7 @@ public:
virtual void output(std::ostream &stream) const override virtual void output(std::ostream &stream) const override
{ {
// output floating point value // output floating point value
stream << "decimal(" << _number / pow(10, _places) << ")"; stream << "decimal(" << _number / pow(10.0f, _places) << ")";
} }
/** /**
@ -138,7 +138,7 @@ public:
*/ */
virtual operator double() const override virtual operator double() const override
{ {
return _number / pow(10, _places); return _number / pow(10.0f, _places);
} }
/** /**
@ -149,7 +149,7 @@ public:
*/ */
virtual operator float() const override virtual operator float() const override
{ {
return static_cast<float>(_number / pow(10, _places)); return static_cast<float>(_number / pow(10.0f, _places));
} }
/** /**