diff options
author | Brian Gianforcaro <bgianf@serenityos.org> | 2021-09-15 23:32:51 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-16 17:17:13 +0200 |
commit | dba5710efa028cc9f7abde0c5fdf06a843ff41a1 (patch) | |
tree | 98988106581843e3ab75867192862f6614d9a711 /Userland/Libraries/LibCrypto/Cipher | |
parent | 5dbc72a1585c7992b2187db42516b5a49dd6c19d (diff) | |
download | serenity-dba5710efa028cc9f7abde0c5fdf06a843ff41a1.zip |
LibCrypto: Use default instead of an empty constructor/destructor
Default implementations allow for more optimizations.
See: https://pvs-studio.com/en/docs/warnings/v832/
Diffstat (limited to 'Userland/Libraries/LibCrypto/Cipher')
-rw-r--r-- | Userland/Libraries/LibCrypto/Cipher/Mode/CBC.h | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibCrypto/Cipher/Mode/CTR.h | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibCrypto/Cipher/Mode/GCM.h | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibCrypto/Cipher/Mode/Mode.h | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibCrypto/Cipher/Mode/CBC.h b/Userland/Libraries/LibCrypto/Cipher/Mode/CBC.h index 4bf5065bdc..a32a0874e3 100644 --- a/Userland/Libraries/LibCrypto/Cipher/Mode/CBC.h +++ b/Userland/Libraries/LibCrypto/Cipher/Mode/CBC.h @@ -19,7 +19,7 @@ class CBC : public Mode<T> { public: constexpr static size_t IVSizeInBits = 128; - virtual ~CBC() { } + virtual ~CBC() = default; template<typename... Args> explicit constexpr CBC<T>(Args... args) : Mode<T>(args...) diff --git a/Userland/Libraries/LibCrypto/Cipher/Mode/CTR.h b/Userland/Libraries/LibCrypto/Cipher/Mode/CTR.h index 730f06e0bc..8a0d557083 100644 --- a/Userland/Libraries/LibCrypto/Cipher/Mode/CTR.h +++ b/Userland/Libraries/LibCrypto/Cipher/Mode/CTR.h @@ -88,7 +88,7 @@ class CTR : public Mode<T> { public: constexpr static size_t IVSizeInBits = 128; - virtual ~CTR() { } + virtual ~CTR() = default; // Must intercept `Intent`, because AES must always be set to // Encryption, even when decrypting AES-CTR. diff --git a/Userland/Libraries/LibCrypto/Cipher/Mode/GCM.h b/Userland/Libraries/LibCrypto/Cipher/Mode/GCM.h index 32558210c4..228b79faea 100644 --- a/Userland/Libraries/LibCrypto/Cipher/Mode/GCM.h +++ b/Userland/Libraries/LibCrypto/Cipher/Mode/GCM.h @@ -24,7 +24,7 @@ class GCM : public CTR<T, IncrementFunction> { public: constexpr static size_t IVSizeInBits = 128; - virtual ~GCM() { } + virtual ~GCM() = default; template<typename... Args> explicit constexpr GCM<T>(Args... args) diff --git a/Userland/Libraries/LibCrypto/Cipher/Mode/Mode.h b/Userland/Libraries/LibCrypto/Cipher/Mode/Mode.h index 4eaf75725f..50c39f9f0c 100644 --- a/Userland/Libraries/LibCrypto/Cipher/Mode/Mode.h +++ b/Userland/Libraries/LibCrypto/Cipher/Mode/Mode.h @@ -17,7 +17,7 @@ namespace Cipher { template<typename T> class Mode { public: - virtual ~Mode() { } + virtual ~Mode() = default; virtual void encrypt(ReadonlyBytes in, Bytes& out, ReadonlyBytes ivec = {}, Bytes* ivec_out = nullptr) = 0; virtual void decrypt(ReadonlyBytes in, Bytes& out, ReadonlyBytes ivec = {}) = 0; |