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

Everywhere: Run clang-format

This commit is contained in:
Idan Horowitz 2022-04-01 20:58:27 +03:00 committed by Linus Groh
parent 0376c127f6
commit 086969277e
1665 changed files with 8479 additions and 8479 deletions

View file

@ -47,7 +47,7 @@ public:
return MUST(adopt_nonnull_ref_or_enomem(new (nothrow) Buffer));
}
Sample const* samples() const { return (const Sample*)data(); }
Sample const* samples() const { return (Sample const*)data(); }
ErrorOr<FixedArray<Sample>> to_sample_array() const
{
@ -86,7 +86,7 @@ private:
Core::AnonymousBuffer m_buffer;
const i32 m_id { -1 };
const int m_sample_count { 0 };
int const m_sample_count { 0 };
};
// This only works for double resamplers, and therefore cannot be part of the class

View file

@ -101,7 +101,7 @@ private:
u16 m_min_block_size { 0 };
u16 m_max_block_size { 0 };
// Frames are units of encoded audio data, both of these are 24-bit
u32 m_min_frame_size { 0 }; //24 bit
u32 m_min_frame_size { 0 }; // 24 bit
u32 m_max_frame_size { 0 }; // 24 bit
u64 m_total_samples { 0 }; // 36 bit
u8 m_md5_checksum[128 / 8]; // 128 bit (!)

View file

@ -35,7 +35,7 @@ public:
virtual MaybeLoaderError reset() = 0;
virtual MaybeLoaderError seek(const int sample_index) = 0;
virtual MaybeLoaderError seek(int const sample_index) = 0;
// total_samples() and loaded_samples() should be independent
// of the number of channels.
@ -63,7 +63,7 @@ public:
LoaderSamples get_more_samples(size_t max_bytes_to_read_from_input = 128 * KiB) const { return m_plugin->get_more_samples(max_bytes_to_read_from_input); }
MaybeLoaderError reset() const { return m_plugin->reset(); }
MaybeLoaderError seek(const int position) const { return m_plugin->seek(position); }
MaybeLoaderError seek(int const position) const { return m_plugin->seek(position); }
int loaded_samples() const { return m_plugin->loaded_samples(); }
int total_samples() const { return m_plugin->total_samples(); }

View file

@ -112,7 +112,7 @@ HuffmanDecodeResult<T> huffman_decode(InputBitStream& bitstream, Span<HuffmanNod
size_t bits_read = 0;
while (!node->is_leaf() && !bitstream.has_any_error() && max_bits_to_read-- > 0) {
const bool direction = bitstream.read_bit_big_endian();
bool const direction = bitstream.read_bit_big_endian();
++bits_read;
if (direction) {
if (node->left == -1)

View file

@ -36,7 +36,7 @@ MaybeLoaderError WavLoaderPlugin::initialize()
return {};
}
WavLoaderPlugin::WavLoaderPlugin(const Bytes& buffer)
WavLoaderPlugin::WavLoaderPlugin(Bytes const& buffer)
{
m_stream = make<InputMemoryStream>(buffer);
if (!m_stream) {
@ -91,7 +91,7 @@ LoaderSamples WavLoaderPlugin::get_more_samples(size_t max_bytes_to_read_from_in
return buffer.release_value();
}
MaybeLoaderError WavLoaderPlugin::seek(const int sample_index)
MaybeLoaderError WavLoaderPlugin::seek(int const sample_index)
{
dbgln_if(AWAVLOADER_DEBUG, "seek sample_index {}", sample_index);
if (sample_index < 0 || sample_index >= m_total_samples)

View file

@ -34,7 +34,7 @@ class Buffer;
class WavLoaderPlugin : public LoaderPlugin {
public:
explicit WavLoaderPlugin(StringView path);
explicit WavLoaderPlugin(const Bytes& buffer);
explicit WavLoaderPlugin(Bytes const& buffer);
virtual MaybeLoaderError initialize() override;
@ -46,7 +46,7 @@ public:
// sample_index 0 is the start of the raw audio sample data
// within the file/stream.
virtual MaybeLoaderError seek(const int sample_index) override;
virtual MaybeLoaderError seek(int const sample_index) override;
virtual int loaded_samples() override { return m_loaded_samples; }
virtual int total_samples() override { return m_total_samples; }

View file

@ -40,7 +40,7 @@ void WavWriter::set_file(StringView path)
m_finalized = false;
}
void WavWriter::write_samples(const u8* samples, size_t size)
void WavWriter::write_samples(u8 const* samples, size_t size)
{
m_data_sz += size;
m_file->write(samples, size);

View file

@ -22,9 +22,9 @@ public:
~WavWriter();
bool has_error() const { return !m_error_string.is_null(); }
const char* error_string() const { return m_error_string.characters(); }
char const* error_string() const { return m_error_string.characters(); }
void write_samples(const u8* samples, size_t size);
void write_samples(u8 const* samples, size_t size);
void finalize(); // You can finalize manually or let the destructor do it.
u32 sample_rate() const { return m_sample_rate; }