use freeze/cast members

This commit is contained in:
Michael Davidsaver
2019-12-14 09:53:31 -08:00
parent 7dd33a0c71
commit 810b7d3b1c
5 changed files with 19 additions and 22 deletions
+3 -3
View File
@@ -114,7 +114,7 @@ void testSerialize2()
arr[0]["value"] = 0xdeadbeef;
arr[1]["value"] = 0x1badface;
fld.from(shared_array_static_cast<const void>(freeze(std::move(arr))));
fld = arr.freeze().castTo<const void>();
testToBytes(true, [&val](Buffer& buf) {
to_wire_valid(buf, val);
@@ -143,7 +143,7 @@ void testSerialize2()
arr[0]["->x"] = "theX";
arr[1]["->y"] = "theY";
fld.from(shared_array_static_cast<const void>(freeze(std::move(arr))));
fld = arr.freeze().castTo<const void>();
testToBytes(true, [&val](Buffer& buf) {
to_wire_valid(buf, val);
@@ -187,7 +187,7 @@ void testSerialize2()
arr[0] = 0x7b;
arr[1]["q"] = "theq";
fld.from(shared_array_static_cast<const void>(freeze(std::move(arr))));
fld = arr.freeze().castTo<const void>();
testToBytes(true, [&val](Buffer& buf) {
to_wire_valid(buf, val);