std: add compact_retaining, history_retain_length

This commit is contained in:
Nigel Tao committed 2023-10-05 13:24:44 +11:00
1 parent 0f91f23bb6
commit 5fb82e7d0a
33 files changed
+1088 -226

No files matched your search

+2 -2
View File
@@ -193,7 +193,7 @@ class Wuffs_Load_RW_Input : public wuffs_aux::sync_io::Input {
private:
std::string //
CopyIn(wuffs_aux::IOBuffer* dst) override {
CopyIn(wuffs_aux::IOBuffer* dst, uint64_t history_retain_length) override {
if (!m_rw) {
return "Wuffs_Load_RW_Input: NULL SDL_RWops";
} else if (!dst) {
@@ -201,7 +201,7 @@ class Wuffs_Load_RW_Input : public wuffs_aux::sync_io::Input {
} else if (dst->meta.closed) {
return "Wuffs_Load_RW_Input: end of file";
}
dst->compact();
dst->compact_retaining(history_retain_length);
if (dst->writer_length() == 0) {
return "Wuffs_Load_RW_Input: full IOBuffer";
}