format everything

This commit is contained in:
Tropical
2026-04-01 13:48:29 -05:00
parent 3e813592e4
commit dd93cfe91e
380 changed files with 2698 additions and 2595 deletions

View File

@@ -18,8 +18,7 @@ ByteArrayOutputStream::ByteArrayOutputStream(unsigned int size) {
buf = std::vector<uint8_t>(size);
}
ByteArrayOutputStream::~ByteArrayOutputStream() {
}
ByteArrayOutputStream::~ByteArrayOutputStream() {}
// Writes the specified byte to this byte array output stream.
// Parameters:
@@ -35,18 +34,21 @@ void ByteArrayOutputStream::write(unsigned int b) {
// Writes b.size() bytes from the specified byte array to this output stream.
// The general contract for write(b) is that it should have exactly the same
// effect as the call write(b, 0, b.size()).
void ByteArrayOutputStream::write(const std::vector<uint8_t>& b) { write(b, 0, b.size()); }
void ByteArrayOutputStream::write(const std::vector<uint8_t>& b) {
write(b, 0, b.size());
}
// Writes len bytes from the specified byte array starting at offset off to this
// byte array output stream. Parameters: b - the data. off - the start offset in
// the data. len - the number of bytes to write.
void ByteArrayOutputStream::write(const std::vector<uint8_t>& b, unsigned int offset,
unsigned int length) {
void ByteArrayOutputStream::write(const std::vector<uint8_t>& b,
unsigned int offset, unsigned int length) {
assert(b.size() >= offset + length);
// If we will fill the buffer we need to make it bigger
if (count + length >= buf.size())
buf.resize(std::max(count + length + 1, (unsigned int)(buf.size() * 2)));
buf.resize(
std::max(count + length + 1, (unsigned int)(buf.size() * 2)));
std::memcpy(&buf[count], &b[offset], length);
// std::copy( b->data+offset, b->data+offset+length, buf->data + count ); //