mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 03:57:35 +00:00
Everywhere: Remove some redundant inline
keywords
Functions defined inside class bodies (including static functions) are implicitly inline, no need to type it out.
This commit is contained in:
parent
5fa8068580
commit
0a3cc10bb6
7 changed files with 39 additions and 39 deletions
|
@ -63,16 +63,16 @@ public:
|
|||
}
|
||||
#endif
|
||||
|
||||
inline static DigestType hash(u8 const* data, size_t length)
|
||||
static DigestType hash(u8 const* data, size_t length)
|
||||
{
|
||||
MD5 md5;
|
||||
md5.update(data, length);
|
||||
return md5.digest();
|
||||
}
|
||||
|
||||
inline static DigestType hash(ByteBuffer const& buffer) { return hash(buffer.data(), buffer.size()); }
|
||||
inline static DigestType hash(StringView buffer) { return hash((u8 const*)buffer.characters_without_null_termination(), buffer.length()); }
|
||||
inline virtual void reset() override
|
||||
static DigestType hash(ByteBuffer const& buffer) { return hash(buffer.data(), buffer.size()); }
|
||||
static DigestType hash(StringView buffer) { return hash((u8 const*)buffer.characters_without_null_termination(), buffer.length()); }
|
||||
virtual void reset() override
|
||||
{
|
||||
m_A = MD5Constants::init_A;
|
||||
m_B = MD5Constants::init_B;
|
||||
|
|
|
@ -42,15 +42,15 @@ public:
|
|||
virtual DigestType digest() override;
|
||||
virtual DigestType peek() override;
|
||||
|
||||
inline static DigestType hash(u8 const* data, size_t length)
|
||||
static DigestType hash(u8 const* data, size_t length)
|
||||
{
|
||||
SHA1 sha;
|
||||
sha.update(data, length);
|
||||
return sha.digest();
|
||||
}
|
||||
|
||||
inline static DigestType hash(ByteBuffer const& buffer) { return hash(buffer.data(), buffer.size()); }
|
||||
inline static DigestType hash(StringView buffer) { return hash((u8 const*)buffer.characters_without_null_termination(), buffer.length()); }
|
||||
static DigestType hash(ByteBuffer const& buffer) { return hash(buffer.data(), buffer.size()); }
|
||||
static DigestType hash(StringView buffer) { return hash((u8 const*)buffer.characters_without_null_termination(), buffer.length()); }
|
||||
|
||||
#ifndef KERNEL
|
||||
virtual DeprecatedString class_name() const override
|
||||
|
@ -59,7 +59,7 @@ public:
|
|||
}
|
||||
#endif
|
||||
|
||||
inline virtual void reset() override
|
||||
virtual void reset() override
|
||||
{
|
||||
m_data_length = 0;
|
||||
m_bit_length = 0;
|
||||
|
|
|
@ -90,15 +90,15 @@ public:
|
|||
virtual DigestType digest() override;
|
||||
virtual DigestType peek() override;
|
||||
|
||||
inline static DigestType hash(u8 const* data, size_t length)
|
||||
static DigestType hash(u8 const* data, size_t length)
|
||||
{
|
||||
SHA256 sha;
|
||||
sha.update(data, length);
|
||||
return sha.digest();
|
||||
}
|
||||
|
||||
inline static DigestType hash(ByteBuffer const& buffer) { return hash(buffer.data(), buffer.size()); }
|
||||
inline static DigestType hash(StringView buffer) { return hash((u8 const*)buffer.characters_without_null_termination(), buffer.length()); }
|
||||
static DigestType hash(ByteBuffer const& buffer) { return hash(buffer.data(), buffer.size()); }
|
||||
static DigestType hash(StringView buffer) { return hash((u8 const*)buffer.characters_without_null_termination(), buffer.length()); }
|
||||
|
||||
#ifndef KERNEL
|
||||
virtual DeprecatedString class_name() const override
|
||||
|
@ -107,7 +107,7 @@ public:
|
|||
}
|
||||
#endif
|
||||
|
||||
inline virtual void reset() override
|
||||
virtual void reset() override
|
||||
{
|
||||
m_data_length = 0;
|
||||
m_bit_length = 0;
|
||||
|
@ -142,15 +142,15 @@ public:
|
|||
virtual DigestType digest() override;
|
||||
virtual DigestType peek() override;
|
||||
|
||||
inline static DigestType hash(u8 const* data, size_t length)
|
||||
static DigestType hash(u8 const* data, size_t length)
|
||||
{
|
||||
SHA384 sha;
|
||||
sha.update(data, length);
|
||||
return sha.digest();
|
||||
}
|
||||
|
||||
inline static DigestType hash(ByteBuffer const& buffer) { return hash(buffer.data(), buffer.size()); }
|
||||
inline static DigestType hash(StringView buffer) { return hash((u8 const*)buffer.characters_without_null_termination(), buffer.length()); }
|
||||
static DigestType hash(ByteBuffer const& buffer) { return hash(buffer.data(), buffer.size()); }
|
||||
static DigestType hash(StringView buffer) { return hash((u8 const*)buffer.characters_without_null_termination(), buffer.length()); }
|
||||
|
||||
#ifndef KERNEL
|
||||
virtual DeprecatedString class_name() const override
|
||||
|
@ -159,7 +159,7 @@ public:
|
|||
}
|
||||
#endif
|
||||
|
||||
inline virtual void reset() override
|
||||
virtual void reset() override
|
||||
{
|
||||
m_data_length = 0;
|
||||
m_bit_length = 0;
|
||||
|
@ -194,15 +194,15 @@ public:
|
|||
virtual DigestType digest() override;
|
||||
virtual DigestType peek() override;
|
||||
|
||||
inline static DigestType hash(u8 const* data, size_t length)
|
||||
static DigestType hash(u8 const* data, size_t length)
|
||||
{
|
||||
SHA512 sha;
|
||||
sha.update(data, length);
|
||||
return sha.digest();
|
||||
}
|
||||
|
||||
inline static DigestType hash(ByteBuffer const& buffer) { return hash(buffer.data(), buffer.size()); }
|
||||
inline static DigestType hash(StringView buffer) { return hash((u8 const*)buffer.characters_without_null_termination(), buffer.length()); }
|
||||
static DigestType hash(ByteBuffer const& buffer) { return hash(buffer.data(), buffer.size()); }
|
||||
static DigestType hash(StringView buffer) { return hash((u8 const*)buffer.characters_without_null_termination(), buffer.length()); }
|
||||
|
||||
#ifndef KERNEL
|
||||
virtual DeprecatedString class_name() const override
|
||||
|
@ -211,7 +211,7 @@ public:
|
|||
}
|
||||
#endif
|
||||
|
||||
inline virtual void reset() override
|
||||
virtual void reset() override
|
||||
{
|
||||
m_data_length = 0;
|
||||
m_bit_length = 0;
|
||||
|
|
|
@ -120,7 +120,7 @@ struct PositionValue {
|
|||
Bottom
|
||||
};
|
||||
|
||||
inline static PositionValue center()
|
||||
static PositionValue center()
|
||||
{
|
||||
return PositionValue { HorizontalPreset::Center, VerticalPreset::Center };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue