aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/filters
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-01-10 00:51:48 -0500
committerJack Lloyd <[email protected]>2016-01-10 00:51:48 -0500
commit45124582e3b964800f0be1f88773dd6f2cafc672 (patch)
tree9bd788556ddf9731e466b7f24a16e604f662ea24 /src/lib/filters
parent672d29570e55686b90126b5d6f5d337ddf0b8f04 (diff)
Add final attribute to many classes
In some cases this can offer better optimization, via devirtualization. And it lets the user know the class is not intended for derivation. Some discussion in GH #402
Diffstat (limited to 'src/lib/filters')
-rw-r--r--src/lib/filters/basefilt.h2
-rw-r--r--src/lib/filters/codec_filt/b64_filt.h4
-rw-r--r--src/lib/filters/codec_filt/hex_filt.h4
-rw-r--r--src/lib/filters/pipe.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/filters/basefilt.h b/src/lib/filters/basefilt.h
index 36c5201a1..c065fae0e 100644
--- a/src/lib/filters/basefilt.h
+++ b/src/lib/filters/basefilt.h
@@ -17,7 +17,7 @@ namespace Botan {
/**
* BitBucket is a filter which simply discards all inputs
*/
-struct BOTAN_DLL BitBucket : public Filter
+struct BOTAN_DLL BitBucket final : public Filter
{
void write(const byte[], size_t) override {}
diff --git a/src/lib/filters/codec_filt/b64_filt.h b/src/lib/filters/codec_filt/b64_filt.h
index c827bcfdd..8761cc327 100644
--- a/src/lib/filters/codec_filt/b64_filt.h
+++ b/src/lib/filters/codec_filt/b64_filt.h
@@ -15,7 +15,7 @@ namespace Botan {
/**
* This class represents a Base64 encoder.
*/
-class BOTAN_DLL Base64_Encoder : public Filter
+class BOTAN_DLL Base64_Encoder final : public Filter
{
public:
std::string name() const override { return "Base64_Encoder"; }
@@ -54,7 +54,7 @@ class BOTAN_DLL Base64_Encoder : public Filter
/**
* This object represents a Base64 decoder.
*/
-class BOTAN_DLL Base64_Decoder : public Filter
+class BOTAN_DLL Base64_Decoder final : public Filter
{
public:
std::string name() const override { return "Base64_Decoder"; }
diff --git a/src/lib/filters/codec_filt/hex_filt.h b/src/lib/filters/codec_filt/hex_filt.h
index 2399c3ec5..cb06d223f 100644
--- a/src/lib/filters/codec_filt/hex_filt.h
+++ b/src/lib/filters/codec_filt/hex_filt.h
@@ -16,7 +16,7 @@ namespace Botan {
* Converts arbitrary binary data to hex strings, optionally with
* newlines inserted
*/
-class BOTAN_DLL Hex_Encoder : public Filter
+class BOTAN_DLL Hex_Encoder final : public Filter
{
public:
/**
@@ -56,7 +56,7 @@ class BOTAN_DLL Hex_Encoder : public Filter
/**
* Converts hex strings to bytes
*/
-class BOTAN_DLL Hex_Decoder : public Filter
+class BOTAN_DLL Hex_Decoder final : public Filter
{
public:
std::string name() const override { return "Hex_Decoder"; }
diff --git a/src/lib/filters/pipe.h b/src/lib/filters/pipe.h
index 7a30bb6a3..23e5b4c8d 100644
--- a/src/lib/filters/pipe.h
+++ b/src/lib/filters/pipe.h
@@ -24,7 +24,7 @@ namespace Botan {
* collected for retrieval. If you're familiar with the Unix shell
* environment, this design will sound quite familiar.
*/
-class BOTAN_DLL Pipe : public DataSource
+class BOTAN_DLL Pipe final : public DataSource
{
public:
/**