Adding fixes for signedness warnings in libsolutil

This commit is contained in:
Djordje Mijovic
2020-06-02 19:01:29 +02:00
parent e7f97cf3ac
commit b4454c4925
7 changed files with 33 additions and 30 deletions
+4 -4
View File
@@ -156,14 +156,14 @@ inline std::string formatNumberReadable(
if (_useTruncation)
{
// return as interior-truncated hex.
int len = str.size();
size_t len = str.size();
if (len < 24)
return str;
int const initialChars = (prefix == HexPrefix::Add) ? 6 : 4;
int const finalChars = 4;
int numSkipped = len - initialChars - finalChars;
size_t const initialChars = (prefix == HexPrefix::Add) ? 6 : 4;
size_t const finalChars = 4;
size_t numSkipped = len - initialChars - finalChars;
return str.substr(0, initialChars) +
"...{+" +