Skip to content

Commit

Permalink
Merge bitcoin#21: Remove hand-coded UniValue destructor.
Browse files Browse the repository at this point in the history
b4cdfc4 Remove hand-coded UniValue destructor. (Martin Ankerl)

Pull request description:

  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.

Top commit has no ACKs.

Tree-SHA512: a4a5a352d946e795b7d78b98b781969caa103acb19770d22d62efd16f42b2845c476dee57df729e983018e065e3b450f3f1e3c95cf68b2f359ee4ca24fba217f
  • Loading branch information
MarcoFalke committed Oct 30, 2019
2 parents 7fba60b + b4cdfc4 commit 5a58a46
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion include/univalue.h
Expand Up @@ -47,7 +47,6 @@ class UniValue {
std::string s(val_);
setStr(s);
}
~UniValue() {}

void clear();

Expand Down

0 comments on commit 5a58a46

Please sign in to comment.