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
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,
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));
}
}