changed hex threshold on ints to 255

- and print it in *addition* to the decimal form
This commit is contained in:
Phil Nash 2015-05-20 18:28:22 +01:00
parent bdbfe69e3c
commit 6ed74b5cab
4 changed files with 30 additions and 28 deletions

View file

@ -98,19 +98,17 @@ std::string toString( wchar_t* const value )
std::string toString( int value ) {
std::ostringstream oss;
if( value > 8192 )
oss << "0x" << std::hex << value;
else
oss << value;
oss << value;
if( value >= 255 )
oss << " (0x" << std::hex << value << ")";
return oss.str();
}
std::string toString( unsigned long value ) {
std::ostringstream oss;
if( value > 8192 )
oss << "0x" << std::hex << value;
else
oss << value;
oss << value;
if( value >= 255 )
oss << " (0x" << std::hex << value << ")";
return oss.str();
}