mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-13 02:22:57 +01:00
unsigned fix
This commit is contained in:
parent
8b43d003f0
commit
c1adffb39c
@ -62,7 +62,10 @@ private:
|
||||
{
|
||||
T n = std::numeric_limits<T>::max();
|
||||
std::string s = Poco::NumberFormatter::format(n);
|
||||
return Poco::NumberParser::parse(s) == n;
|
||||
if (std::numeric_limits<T>::is_signed)
|
||||
return Poco::NumberParser::parse(s) == n;
|
||||
else
|
||||
return Poco::NumberParser::parseUnsigned(s) == n;
|
||||
}
|
||||
|
||||
template <class T> bool testLowerLimit()
|
||||
@ -77,7 +80,10 @@ private:
|
||||
{
|
||||
T n = std::numeric_limits<T>::max();
|
||||
std::string s = Poco::NumberFormatter::format(n);
|
||||
return Poco::NumberParser::parse64(s) == n;
|
||||
if (std::numeric_limits<T>::is_signed)
|
||||
return Poco::NumberParser::parse64(s) == n;
|
||||
else
|
||||
return Poco::NumberParser::parseUnsigned64(s) == n;
|
||||
}
|
||||
|
||||
template <class T> bool testLowerLimit64()
|
||||
|
Loading…
Reference in New Issue
Block a user