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

AK: Rename Vector::append(Vector) => Vector::extend(Vector)

Let's make it a bit more clear when we're appending the elements from
one vector to the end of another vector.
This commit is contained in:
Andreas Kling 2021-06-12 13:24:45 +02:00
parent 7e1bffdeb8
commit dc65f54c06
37 changed files with 103 additions and 104 deletions

View file

@ -424,9 +424,9 @@ static bool set_dib_bitmasks(BMPLoadingContext& context, InputStreamer& streamer
auto& type = context.dib_type;
if (type > DIBType::OSV2 && bpp == 16 && compression == Compression::RGB) {
context.dib.info.masks.append({ 0x7c00, 0x03e0, 0x001f });
context.dib.info.mask_shifts.append({ 7, 2, -3 });
context.dib.info.mask_sizes.append({ 5, 5, 5 });
context.dib.info.masks.extend({ 0x7c00, 0x03e0, 0x001f });
context.dib.info.mask_shifts.extend({ 7, 2, -3 });
context.dib.info.mask_sizes.extend({ 5, 5, 5 });
} else if (type == DIBType::Info && (compression == Compression::BITFIELDS || compression == Compression::ALPHABITFIELDS)) {
// Consume the extra BITFIELDS bytes
auto number_of_mask_fields = compression == Compression::ALPHABITFIELDS ? 4 : 3;

View file

@ -160,7 +160,7 @@ public:
void reset()
{
m_code_table.clear();
m_code_table.append(m_original_code_table);
m_code_table.extend(m_original_code_table);
m_code_size = m_original_code_size;
m_table_capacity = pow(2, m_code_size);
m_output.clear();

View file

@ -129,7 +129,7 @@ void PNGWriter::add_chunk(PNGChunk const& png_chunk)
for (auto character : png_chunk.type()) {
combined.append(character);
}
combined.append(png_chunk.data());
combined.extend(png_chunk.data());
auto crc = BigEndian(Crypto::Checksum::CRC32({ (const u8*)combined.data(), combined.size() }).digest());
auto data_len = BigEndian(png_chunk.data().size());