diff options
author | Lee Clagett <code@leeclagett.com> | 2017-02-27 13:33:16 -0500 |
---|---|---|
committer | Lee Clagett <code@leeclagett.com> | 2017-04-11 16:35:00 -0400 |
commit | 4a8f96f95da51e6b570a00ddcfefe100844d8f8b (patch) | |
tree | ac8e18d7c08d336eac28481727f2accc00b1b544 /src/ringct | |
parent | Merge pull request #1956 (diff) | |
download | monero-4a8f96f95da51e6b570a00ddcfefe100844d8f8b.tar.xz |
Improvements for epee binary to hex functions:
- Performance improvements
- Added `span` for zero-copy pointer+length arguments
- Added `std::ostream` overload for direct writing to output buffers
- Removal of unused `string_tools::buff_to_hex`
Diffstat (limited to 'src/ringct')
-rw-r--r-- | src/ringct/rctTypes.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ringct/rctTypes.h b/src/ringct/rctTypes.h index 0c27745e1..baa99bbcb 100644 --- a/src/ringct/rctTypes.h +++ b/src/ringct/rctTypes.h @@ -47,6 +47,7 @@ extern "C" { #include "crypto/generic-ops.h" #include "crypto/crypto.h" +#include "hex.h" #include "serialization/serialization.h" #include "serialization/debug_archive.h" #include "serialization/binary_archive.h" @@ -443,8 +444,7 @@ namespace cryptonote { static inline bool operator!=(const crypto::secret_key &k0, const rct::key &k1) { return memcmp(&k0, &k1, 32); } } -template<typename T> std::ostream &print256(std::ostream &o, const T &v); -inline std::ostream &operator <<(std::ostream &o, const rct::key &v) { return print256(o, v); } +inline std::ostream &operator <<(std::ostream &o, const rct::key &v) { epee::to_hex::formatted_from_pod(o, v); return o; } BLOB_SERIALIZER(rct::key); |