mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:17:34 +00:00
Everywhere: Remove needless trailing semi-colons after functions
This is a new option in clang-format-16.
This commit is contained in:
parent
aff81d318b
commit
c911781c21
243 changed files with 483 additions and 481 deletions
|
@ -39,7 +39,7 @@ BigFraction::BigFraction(StringView sv)
|
|||
auto fraction_length = UnsignedBigInteger(static_cast<u64>(fraction_part_view.length()));
|
||||
|
||||
*this = BigFraction(move(integer_part)) + BigFraction(move(fractional_part), NumberTheory::Power("10"_bigint, move(fraction_length)));
|
||||
};
|
||||
}
|
||||
|
||||
BigFraction BigFraction::operator+(BigFraction const& rhs) const
|
||||
{
|
||||
|
|
|
@ -108,7 +108,7 @@ public:
|
|||
|
||||
// These get + 1 byte for the sign.
|
||||
[[nodiscard]] size_t length() const { return m_unsigned_data.length() + 1; }
|
||||
[[nodiscard]] size_t trimmed_length() const { return m_unsigned_data.trimmed_length() + 1; };
|
||||
[[nodiscard]] size_t trimmed_length() const { return m_unsigned_data.trimmed_length() + 1; }
|
||||
|
||||
[[nodiscard]] SignedBigInteger plus(SignedBigInteger const& other) const;
|
||||
[[nodiscard]] SignedBigInteger minus(SignedBigInteger const& other) const;
|
||||
|
|
|
@ -16,7 +16,7 @@ void Adler32::update(ReadonlyBytes data)
|
|||
m_state_a = (m_state_a + data.at(i)) % 65521;
|
||||
m_state_b = (m_state_b + m_state_a) % 65521;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
u32 Adler32::digest()
|
||||
{
|
||||
|
|
|
@ -41,7 +41,7 @@ void CRC32::update(ReadonlyBytes span)
|
|||
++data;
|
||||
--size;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// FIXME: On Intel, use _mm_crc32_u8 / _mm_crc32_u64 if available (SSE 4.2).
|
||||
|
||||
|
@ -133,7 +133,7 @@ void CRC32::update(ReadonlyBytes data)
|
|||
|
||||
for (auto byte : aligned_data)
|
||||
m_state = single_byte_crc(m_state, byte);
|
||||
};
|
||||
}
|
||||
|
||||
# else
|
||||
|
||||
|
@ -164,7 +164,7 @@ void CRC32::update(ReadonlyBytes data)
|
|||
for (size_t i = 0; i < data.size(); i++) {
|
||||
m_state = table[(m_state ^ data.at(i)) & 0xFF] ^ (m_state >> 8);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
CipherBlock::overwrite(data, length);
|
||||
}
|
||||
|
||||
constexpr static size_t block_size() { return BlockSizeInBits / 8; };
|
||||
constexpr static size_t block_size() { return BlockSizeInBits / 8; }
|
||||
|
||||
virtual ReadonlyBytes bytes() const override { return ReadonlyBytes { m_data, sizeof(m_data) }; }
|
||||
virtual Bytes bytes() override { return Bytes { m_data, sizeof(m_data) }; }
|
||||
|
@ -59,10 +59,10 @@ private:
|
|||
};
|
||||
|
||||
struct AESCipherKey : public CipherKey {
|
||||
virtual ReadonlyBytes bytes() const override { return ReadonlyBytes { m_rd_keys, sizeof(m_rd_keys) }; };
|
||||
virtual ReadonlyBytes bytes() const override { return ReadonlyBytes { m_rd_keys, sizeof(m_rd_keys) }; }
|
||||
virtual void expand_encrypt_key(ReadonlyBytes user_key, size_t bits) override;
|
||||
virtual void expand_decrypt_key(ReadonlyBytes user_key, size_t bits) override;
|
||||
static bool is_valid_key_size(size_t bits) { return bits == 128 || bits == 192 || bits == 256; };
|
||||
static bool is_valid_key_size(size_t bits) { return bits == 128 || bits == 192 || bits == 256; }
|
||||
|
||||
#ifndef KERNEL
|
||||
DeprecatedString to_deprecated_string() const;
|
||||
|
@ -114,8 +114,8 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
virtual AESCipherKey const& key() const override { return m_key; };
|
||||
virtual AESCipherKey& key() override { return m_key; };
|
||||
virtual AESCipherKey const& key() const override { return m_key; }
|
||||
virtual AESCipherKey& key() override { return m_key; }
|
||||
|
||||
virtual void encrypt_block(BlockType const& in, BlockType& out) override;
|
||||
virtual void decrypt_block(BlockType const& in, BlockType& out) override;
|
||||
|
|
|
@ -81,7 +81,7 @@ private:
|
|||
|
||||
struct CipherKey {
|
||||
virtual ReadonlyBytes bytes() const = 0;
|
||||
static bool is_valid_key_size(size_t) { return false; };
|
||||
static bool is_valid_key_size(size_t) { return false; }
|
||||
|
||||
virtual ~CipherKey() = default;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ ErrorOr<ByteBuffer> Ed25519::generate_private_key()
|
|||
auto buffer = TRY(ByteBuffer::create_uninitialized(key_size()));
|
||||
fill_with_random(buffer);
|
||||
return buffer;
|
||||
};
|
||||
}
|
||||
|
||||
// https://datatracker.ietf.org/doc/html/rfc8032#section-5.1.5
|
||||
ErrorOr<ByteBuffer> Ed25519::generate_public_key(ReadonlyBytes private_key)
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
#include <AK/Types.h>
|
||||
#include <LibCrypto/Hash/MD5.h>
|
||||
|
||||
static constexpr u32 F(u32 x, u32 y, u32 z) { return (x & y) | ((~x) & z); };
|
||||
static constexpr u32 G(u32 x, u32 y, u32 z) { return (x & z) | ((~z) & y); };
|
||||
static constexpr u32 H(u32 x, u32 y, u32 z) { return x ^ y ^ z; };
|
||||
static constexpr u32 I(u32 x, u32 y, u32 z) { return y ^ (x | ~z); };
|
||||
static constexpr u32 F(u32 x, u32 y, u32 z) { return (x & y) | ((~x) & z); }
|
||||
static constexpr u32 G(u32 x, u32 y, u32 z) { return (x & z) | ((~z) & y); }
|
||||
static constexpr u32 H(u32 x, u32 y, u32 z) { return x ^ y ^ z; }
|
||||
static constexpr u32 I(u32 x, u32 y, u32 z) { return y ^ (x | ~z); }
|
||||
static constexpr u32 ROTATE_LEFT(u32 x, size_t n)
|
||||
{
|
||||
return (x << n) | (x >> (32 - n));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue