Skip to content

Commit

Permalink
Enable devirtualization opportunities by using the final specifier (C…
Browse files Browse the repository at this point in the history
…++11)

* Declaring CCoinsViewErrorCatcher final enables devirtualization of two calls
* Declaring CReserveKey final enables devirtualization of one call
  • Loading branch information
practicalswift authored and theuni committed Jul 17, 2017
1 parent 9a1675e commit 40a0f9f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/init.cpp
Expand Up @@ -133,7 +133,7 @@ bool ShutdownRequested()
* chainstate, while keeping user interface out of the common library, which is shared
* between bitcoind, and bitcoin-qt and non-server tools.
*/
class CCoinsViewErrorCatcher : public CCoinsViewBacked
class CCoinsViewErrorCatcher final : public CCoinsViewBacked
{
public:
CCoinsViewErrorCatcher(CCoinsView* view) : CCoinsViewBacked(view) {}
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/wallet.h
Expand Up @@ -1135,7 +1135,7 @@ class CWallet final : public CCryptoKeyStore, public CValidationInterface
};

/** A key allocated from the key pool. */
class CReserveKey : public CReserveScript
class CReserveKey final : public CReserveScript
{
protected:
CWallet* pwallet;
Expand Down

0 comments on commit 40a0f9f

Please sign in to comment.