1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:07:36 +00:00

LibCompress/Brotli: Remove CanonicalCode::clear()

This function was used in a single place and don't provide a huge
benefit over simply recreating the object.
This commit is contained in:
Lucas CHOLLET 2023-07-21 13:29:52 -04:00 committed by Andreas Kling
parent 63e72feee1
commit 3fdf5072ec
2 changed files with 2 additions and 8 deletions

View file

@ -446,11 +446,10 @@ ErrorOr<void> BrotliDecompressionStream::read_block_configuration(Block& block)
block.type_previous = 1;
block.number_of_types = blocks_of_type;
block.type_code.clear();
block.length_code.clear();
if (blocks_of_type == 1) {
block.length = 16 * MiB;
block.type_code = {};
block.length_code = {};
} else {
block.type_code = TRY(CanonicalCode::read_prefix_code(m_input_stream, 2 + blocks_of_type));
block.length_code = TRY(CanonicalCode::read_prefix_code(m_input_stream, 26));