mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:17:35 +00:00
Everywhere: Use C++ concepts instead of requires clauses
This commit is contained in:
parent
9721da2e6a
commit
ae2abcebbb
17 changed files with 60 additions and 61 deletions
|
@ -44,8 +44,8 @@ public:
|
|||
u32 crc();
|
||||
|
||||
private:
|
||||
template<typename T>
|
||||
requires(IsUnsigned<T>) ErrorOr<void> add(T);
|
||||
template<Unsigned T>
|
||||
ErrorOr<void> add(T);
|
||||
|
||||
ByteBuffer m_data;
|
||||
DeprecatedString m_type;
|
||||
|
@ -77,8 +77,8 @@ u32 PNGChunk::crc()
|
|||
return crc;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
requires(IsUnsigned<T>) ErrorOr<void> PNGChunk::add(T data)
|
||||
template<Unsigned T>
|
||||
ErrorOr<void> PNGChunk::add(T data)
|
||||
{
|
||||
TRY(m_data.try_append(&data, sizeof(T)));
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue