summaryrefslogtreecommitdiff
path: root/patch_writer.cc
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2018-03-02 16:22:10 -0800
committerTianjie Xu <xunchang@google.com>2018-03-02 16:47:09 -0800
commit2e70b558e7ed0ecf02f13cf01bb367bb6e748e48 (patch)
tree5f038b9fff1800e4fdf0f30617535cef2fe35996 /patch_writer.cc
parentaa3cb25c11973b1dc26618fa472239ccc859e700 (diff)
downloadbsdiff-2e70b558e7ed0ecf02f13cf01bb367bb6e748e48.tar.gz
Rename the variable 'quality' to 'brotli_quality'
Right now the quality is only used in the brotli compressor. And it would be ambiguous if we add another compressor in the future; since the compressors may have different interpretion on the quality value. Test: unit tests pass; run bsdiff Change-Id: I23af06a135b2b47df5209171f7db0773ac02a326
Diffstat (limited to 'patch_writer.cc')
-rw-r--r--patch_writer.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/patch_writer.cc b/patch_writer.cc
index 7bed2ca..a4fee4a 100644
--- a/patch_writer.cc
+++ b/patch_writer.cc
@@ -35,16 +35,16 @@ BsdiffPatchWriter::BsdiffPatchWriter(const std::string& patch_filename)
BsdiffPatchWriter::BsdiffPatchWriter(const std::string& patch_filename,
CompressorType type,
- int quality)
+ int brotli_quality)
: patch_filename_(patch_filename), format_(BsdiffFormat::kBsdf2) {
if (type == CompressorType::kBZ2) {
ctrl_stream_.reset(new BZ2Compressor());
diff_stream_.reset(new BZ2Compressor());
extra_stream_.reset(new BZ2Compressor());
} else if (type == CompressorType::kBrotli) {
- ctrl_stream_.reset(new BrotliCompressor(quality));
- diff_stream_.reset(new BrotliCompressor(quality));
- extra_stream_.reset(new BrotliCompressor(quality));
+ ctrl_stream_.reset(new BrotliCompressor(brotli_quality));
+ diff_stream_.reset(new BrotliCompressor(brotli_quality));
+ extra_stream_.reset(new BrotliCompressor(brotli_quality));
}
}