1
Fork 0
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:
asynts 2020-09-15 12:18:31 +02:00 committed by Andreas Kling
parent 83d0803861
commit c8ed882b8e
2 changed files with 11 additions and 3 deletions

View file

@ -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