mirror of
https://github.com/monero-project/monero.git
synced 2025-12-09 08:31:28 +09:00
Merge pull request #9848
f8ecd3174 Fix copies in ZMQ input/output (Lee *!* Clagett)
This commit is contained in:
commit
d1a038683d
@ -57,9 +57,7 @@
|
|||||||
|
|
||||||
#define GET_FROM_JSON_OBJECT(source, dst, key) \
|
#define GET_FROM_JSON_OBJECT(source, dst, key) \
|
||||||
OBJECT_HAS_MEMBER_OR_THROW(source, #key) \
|
OBJECT_HAS_MEMBER_OR_THROW(source, #key) \
|
||||||
decltype(dst) dstVal##key; \
|
cryptonote::json::fromJsonValue(source[#key], dst)
|
||||||
cryptonote::json::fromJsonValue(source[#key], dstVal##key); \
|
|
||||||
dst = dstVal##key;
|
|
||||||
|
|
||||||
namespace cryptonote
|
namespace cryptonote
|
||||||
{
|
{
|
||||||
@ -377,7 +375,7 @@ inline typename std::enable_if<sfinae::is_vector_like<Vec>::value, void>::type t
|
|||||||
static_assert(!std::is_same<value_type, unsigned char>::value, "encoding an array of unsigned char is faster as hex");
|
static_assert(!std::is_same<value_type, unsigned char>::value, "encoding an array of unsigned char is faster as hex");
|
||||||
|
|
||||||
dest.StartArray();
|
dest.StartArray();
|
||||||
for (auto t : vec)
|
for (const auto& t : vec)
|
||||||
toJsonValue(dest, t);
|
toJsonValue(dest, t);
|
||||||
dest.EndArray();
|
dest.EndArray();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user