Skip to content

Commit

Permalink
Remove hand-coded UniValue destructor.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
martinus committed Oct 29, 2019
1 parent 7fba60b commit b4cdfc4
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion include/univalue.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ class UniValue {
std::string s(val_);
setStr(s);
}
~UniValue() {}

void clear();

Expand Down

0 comments on commit b4cdfc4

Please sign in to comment.