diff --git a/test/statetest/statetest.hpp b/test/statetest/statetest.hpp index 1b750130a6..4c6a46483b 100644 --- a/test/statetest/statetest.hpp +++ b/test/statetest/statetest.hpp @@ -84,7 +84,8 @@ namespace utils inline std::string shortest_hex(uint64_t v, bool add_prefix = true) { - if (v == 0) { + if (v == 0) + { return add_prefix ? "0x0" : "0"; } @@ -93,7 +94,8 @@ inline std::string shortest_hex(uint64_t v, bool add_prefix = true) value += evmc::hex(static_cast(v >> 8 * (8 - i - 1))); // String leading zeroes. - if (size_t pos = value.find_first_not_of("0"); pos != std::string::npos) { + if (size_t pos = value.find_first_not_of("0"); pos != std::string::npos) + { value = value.substr(pos); } return (add_prefix ? "0x" : "") + value;