diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-11-11 12:13:21 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-11-14 18:27:12 +0000 |
commit | feef1c6aace7c320502feb179b64a33101a62f67 (patch) | |
tree | e13da2b4c733b584171f22502f519283dfa9e929 /contrib/epee/include/string_tools.h | |
parent | Merge pull request #6088 (diff) | |
download | monero-feef1c6aace7c320502feb179b64a33101a62f67.tar.xz |
epee: fix peer ids being truncated on display
Diffstat (limited to '')
-rw-r--r-- | contrib/epee/include/string_tools.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/epee/include/string_tools.h b/contrib/epee/include/string_tools.h index 1be5eb5e1..319c0121b 100644 --- a/contrib/epee/include/string_tools.h +++ b/contrib/epee/include/string_tools.h @@ -188,8 +188,10 @@ POP_WARNINGS return boost::lexical_cast<std::string>(val); } //---------------------------------------------------------------------------- - inline std::string to_string_hex(uint32_t val) + template<typename T> + inline std::string to_string_hex(const T &val) { + static_assert(std::is_arithmetic<T>::value, "only arithmetic types"); std::stringstream ss; ss << std::hex << val; std::string s; |