diff options
author | crupest <crupest@outlook.com> | 2024-06-10 13:40:32 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2024-06-10 23:48:32 +0800 |
commit | 2f5651cd1a1efb136179cdbcb3b29ed0cc11ca2a (patch) | |
tree | 400236cca0b1d28b0361f51c09ce4e2bf7d89d6c /include/cru/common/io/BufferStream.h | |
parent | 633c77d7cd2dd5cd22018aca17da1490e34d94ec (diff) | |
download | cru-2f5651cd1a1efb136179cdbcb3b29ed0cc11ca2a.tar.gz cru-2f5651cd1a1efb136179cdbcb3b29ed0cc11ca2a.tar.bz2 cru-2f5651cd1a1efb136179cdbcb3b29ed0cc11ca2a.zip |
HALF WORK: still need to fix invalid size value in Buffer.
NEED TEST: BufferStream, AutoReadStream, SubProcess.
Diffstat (limited to 'include/cru/common/io/BufferStream.h')
-rw-r--r-- | include/cru/common/io/BufferStream.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/cru/common/io/BufferStream.h b/include/cru/common/io/BufferStream.h index d5d165cb..16ba999b 100644 --- a/include/cru/common/io/BufferStream.h +++ b/include/cru/common/io/BufferStream.h @@ -46,7 +46,9 @@ struct BufferStreamOptions { return block_size <= 0 ? kDefaultBlockSize : block_size; } - Index GetMaxBlockCount() const { return total_size_limit / block_size; } + Index GetMaxBlockCount() const { + return total_size_limit / GetBlockSizeOrDefault(); + } }; /** |