From b4cdfc4f4759efa8ccf63feb29450f3b20d1b3e9 Mon Sep 17 00:00:00 2001 From: Martin Ankerl Date: Tue, 29 Oct 2019 21:31:45 +0100 Subject: [PATCH] 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` 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. --- include/univalue.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/univalue.h b/include/univalue.h index 91b104e..6080516 100644 --- a/include/univalue.h +++ b/include/univalue.h @@ -47,7 +47,6 @@ class UniValue { std::string s(val_); setStr(s); } - ~UniValue() {} void clear();