mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:17:44 +00:00
AK: Add OutputMemoryStream::fill_to_end.
This commit is contained in:
parent
83d0803861
commit
c8ed882b8e
2 changed files with 11 additions and 3 deletions
|
@ -165,11 +165,12 @@ public:
|
|||
return TypedTransfer<typename RemoveConst<T>::Type>::copy(other.data(), data(), count);
|
||||
}
|
||||
|
||||
ALWAYS_INLINE void fill(const T& value)
|
||||
ALWAYS_INLINE size_t fill(const T& value)
|
||||
{
|
||||
for (size_t idx = 0; idx < size(); ++idx) {
|
||||
for (size_t idx = 0; idx < size(); ++idx)
|
||||
data()[idx] = value;
|
||||
}
|
||||
|
||||
return size();
|
||||
}
|
||||
|
||||
bool contains_slow(const T& value) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue