diff --git a/include/fc/variant.hpp b/include/fc/variant.hpp index 3e7b095..ed91ffe 100644 --- a/include/fc/variant.hpp +++ b/include/fc/variant.hpp @@ -322,6 +322,15 @@ namespace fc vars[i] = variant(t[i]); v = vars; } + /** @ingroup Serializable */ + template + void to_variant( const std::pair& t, variant& v ) + { + std::vector vars(2); + vars[0] = variant(t.first); + vars[1] = variant(t.second); + v = vars; + } template diff --git a/src/crypto/ripemd160.cpp b/src/crypto/ripemd160.cpp index 576b323..ed3671a 100644 --- a/src/crypto/ripemd160.cpp +++ b/src/crypto/ripemd160.cpp @@ -26,6 +26,10 @@ char* ripemd160::data()const { return (char*)&_hash[0]; } struct ripemd160::encoder::impl { + impl() + { + memset( (char*)&ctx, 0, sizeof(ctx) ); + } RIPEMD160_CTX ctx; };