Skip to content

Commit b4cdfc4

Browse files
committed
Remove hand-coded UniValue destructor.
When the hand-written destructor is removed, the compiler will automatically create a proper one, with correct `noexcept`. This allows `std::vector<UniValue>` to be resized without having to copy all elements first, which makes JSON generation of a bitcoin block (as in the benchmark "BlockToJsonVerbose") 25% faster on my machine.
1 parent 7fba60b commit b4cdfc4

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

include/univalue.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ class UniValue {
4747
std::string s(val_);
4848
setStr(s);
4949
}
50-
~UniValue() {}
5150

5251
void clear();
5352

0 commit comments

Comments
 (0)