mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 02:09:24 +00:00
AK: Let CountingStream take an initial value for the counter
This commit is contained in:
parent
3dd246a8e1
commit
6c312188dc
Notes:
github-actions[bot]
2025-06-11 16:18:05 +00:00
Author: https://github.com/alimpfard
Commit: 6c312188dc
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4709
Reviewed-by: https://github.com/ADKaster ✅
2 changed files with 3 additions and 2 deletions
|
@ -8,8 +8,9 @@
|
||||||
|
|
||||||
namespace AK {
|
namespace AK {
|
||||||
|
|
||||||
CountingStream::CountingStream(MaybeOwned<Stream> stream)
|
CountingStream::CountingStream(MaybeOwned<Stream> stream, size_t offset)
|
||||||
: m_stream(move(stream))
|
: m_stream(move(stream))
|
||||||
|
, m_read_bytes(offset)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace AK {
|
||||||
|
|
||||||
class CountingStream : public Stream {
|
class CountingStream : public Stream {
|
||||||
public:
|
public:
|
||||||
CountingStream(MaybeOwned<Stream>);
|
CountingStream(MaybeOwned<Stream>, size_t offset = 0);
|
||||||
|
|
||||||
u64 read_bytes() const;
|
u64 read_bytes() const;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue