aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/string_tools.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-11-11 12:13:21 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-11-14 18:27:12 +0000
commitfeef1c6aace7c320502feb179b64a33101a62f67 (patch)
treee13da2b4c733b584171f22502f519283dfa9e929 /contrib/epee/include/string_tools.h
parentMerge pull request #6088 (diff)
downloadmonero-feef1c6aace7c320502feb179b64a33101a62f67.tar.xz
epee: fix peer ids being truncated on display
Diffstat (limited to '')
-rw-r--r--contrib/epee/include/string_tools.h4
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;