Skip to content

Commit 40a0f9f

Browse files
practicalswifttheuni
authored andcommitted
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
1 parent 9a1675e commit 40a0f9f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ bool ShutdownRequested()
133133
* chainstate, while keeping user interface out of the common library, which is shared
134134
* between bitcoind, and bitcoin-qt and non-server tools.
135135
*/
136-
class CCoinsViewErrorCatcher : public CCoinsViewBacked
136+
class CCoinsViewErrorCatcher final : public CCoinsViewBacked
137137
{
138138
public:
139139
CCoinsViewErrorCatcher(CCoinsView* view) : CCoinsViewBacked(view) {}

src/wallet/wallet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,7 @@ class CWallet final : public CCryptoKeyStore, public CValidationInterface
11351135
};
11361136

11371137
/** A key allocated from the key pool. */
1138-
class CReserveKey : public CReserveScript
1138+
class CReserveKey final : public CReserveScript
11391139
{
11401140
protected:
11411141
CWallet* pwallet;

0 commit comments

Comments
 (0)