Skip to content

Commit

Permalink
Remove another unused field.
Browse files Browse the repository at this point in the history
  • Loading branch information
levlam committed Feb 29, 2024
1 parent e82007e commit 0a3fa80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions tdutils/td/utils/GzipByteFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@ bool GzipByteFlow::loop() {
auto r_state = gzip_.run();
auto output_size = gzip_.flush_output();
if (output_size) {
uncommitted_size_ += output_size;
total_output_size_ += output_size;
if (total_output_size_ > max_output_size_) {
if (output_size > max_output_size_ || total_output_size_ > max_output_size_ - output_size) {
finish(Status::Error("Max output size limit exceeded"));
return false;
}
total_output_size_ += output_size;
output_.confirm_append(output_size);
}

Expand Down
1 change: 0 additions & 1 deletion tdutils/td/utils/GzipByteFlow.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class GzipByteFlow final : public ByteFlowBase {

private:
Gzip gzip_;
size_t uncommitted_size_ = 0;
size_t total_output_size_ = 0;
size_t max_output_size_ = std::numeric_limits<size_t>::max();
};
Expand Down

0 comments on commit 0a3fa80

Please sign in to comment.