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
This commit is contained in:
practicalswift authored and Cory Fields committed 2017-07-17 11:35:13 -04:00
1 parent 9a1675ee5b
commit 40a0f9fb96
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -133,7 +133,7 @@ bool ShutdownRequested()
* chainstate, while keeping user interface out of the common library, which is shared * chainstate, while keeping user interface out of the common library, which is shared
* between bitcoind, and bitcoin-qt and non-server tools. * between bitcoind, and bitcoin-qt and non-server tools.
*/ */
class CCoinsViewErrorCatcher : public CCoinsViewBacked class CCoinsViewErrorCatcher final : public CCoinsViewBacked
{ {
public: public:
CCoinsViewErrorCatcher(CCoinsView* view) : CCoinsViewBacked(view) {} CCoinsViewErrorCatcher(CCoinsView* view) : CCoinsViewBacked(view) {}
+1 -1
View File
@@ -1135,7 +1135,7 @@ public:
}; };
/** A key allocated from the key pool. */ /** A key allocated from the key pool. */
class CReserveKey : public CReserveScript class CReserveKey final : public CReserveScript
{ {
protected: protected:
CWallet* pwallet; CWallet* pwallet;