aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoin-cli.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-02-06 18:05:11 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2018-02-06 18:05:34 +0100
commit1462bde767a121233118c04c5629bd9de1ba0f16 (patch)
tree814e7e384c9cdf0517ef23fe84d5f4f7a681ed59 /src/bitcoin-cli.cpp
parent5ad320598f06370de65f83b6c6a993123f00b329 (diff)
parentbdb3231bee7a729a94045133fc4335226b2b0bb9 (diff)
downloadbitcoin-1462bde767a121233118c04c5629bd9de1ba0f16.tar.xz
Merge #12050: [trivial] Implements a virtual destructor on the BaseRequestHandler class.
bdb3231 Implements a virtual destructor on the BaseRequestHandler class. (251) Pull request description: Granted that there is no undefined behavior in the current implementation, this PR implements a virtual destructor on the BaseRequestHandler class to protect against undefined behavior in the event that an object of a potential future derived BaseRequestHandler class with a destructor is destroyed through a pointer to this base class. This PR also fixes "_warning: delete called on 'BaseRequestHandler' that is abstract but has non-virtual destructor [-Wdelete-non-virtual-dtor]_" warnings in environments where the project is built with the `-Wsystem-headers` flag; or environments where the `-Wdelete-non-virtual-dtor` diagnostics flag fires from system headers. Tree-SHA512: 3c3b0797a8dbce8d8c5b244709e8bca41c4e28d5ba554a974bf7fc9128413e1098c457a00e51b21154ce6c11ce5da3071626e71d593b2550d0020bc589406eed
Diffstat (limited to 'src/bitcoin-cli.cpp')
-rw-r--r--src/bitcoin-cli.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index 8fc708be6b..a60d3b3b6d 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -198,6 +198,7 @@ static void http_error_cb(enum evhttp_request_error err, void *ctx)
class BaseRequestHandler
{
public:
+ virtual ~BaseRequestHandler() {}
virtual UniValue PrepareRequest(const std::string& method, const std::vector<std::string>& args) = 0;
virtual UniValue ProcessReply(const UniValue &batch_in) = 0;
};