Browse Source

Enable devirtualization opportunities by using the final specifier (C++11)

* Declaring CCoinsViewErrorCatcher final enables devirtualization of two calls
* Declaring CReserveKey final enables devirtualization of one call
0.16
practicalswift 7 years ago committed by Cory Fields
parent
commit
40a0f9fb96
  1. 2
      src/init.cpp
  2. 2
      src/wallet/wallet.h

2
src/init.cpp

@ -133,7 +133,7 @@ bool ShutdownRequested() @@ -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) {}

2
src/wallet/wallet.h

@ -1135,7 +1135,7 @@ public: @@ -1135,7 +1135,7 @@ public:
};
/** A key allocated from the key pool. */
class CReserveKey : public CReserveScript
class CReserveKey final : public CReserveScript
{
protected:
CWallet* pwallet;

Loading…
Cancel
Save