Formatted code (#1007)

* Updated style

* Updated files

* fixed new line

* Updated spacing

* File fix WIP

* Updated to clang 13

* updated comment style

* Removed old comment code
This commit is contained in:
jLynx 2023-05-19 08:16:05 +12:00 committed by GitHub
parent 7aca7ce74d
commit 033c4e9a5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
599 changed files with 70746 additions and 66896 deletions

View file

@ -32,28 +32,28 @@
#include <memory>
class StreamOutput {
public:
StreamOutput(ReplayConfig* const config);
StreamOutput(const StreamOutput&) = delete;
StreamOutput(StreamOutput&&) = delete;
StreamOutput& operator=(const StreamOutput&) = delete;
StreamOutput& operator=(StreamOutput&&) = delete;
public:
StreamOutput(ReplayConfig* const config);
size_t read(void* const data, const size_t length);
StreamOutput(const StreamOutput&) = delete;
StreamOutput(StreamOutput&&) = delete;
StreamOutput& operator=(const StreamOutput&) = delete;
StreamOutput& operator=(StreamOutput&&) = delete;
private:
static constexpr size_t buffer_count_max_log2 = 3;
static constexpr size_t buffer_count_max = 1U << buffer_count_max_log2;
FIFO<StreamBuffer*> fifo_buffers_empty;
FIFO<StreamBuffer*> fifo_buffers_full;
std::array<StreamBuffer, buffer_count_max> buffers { };
std::array<StreamBuffer*, buffer_count_max> buffers_empty { };
std::array<StreamBuffer*, buffer_count_max> buffers_full { };
StreamBuffer* active_buffer { nullptr };
ReplayConfig* const config { nullptr };
std::unique_ptr<uint8_t[]> data { };
size_t read(void* const data, const size_t length);
private:
static constexpr size_t buffer_count_max_log2 = 3;
static constexpr size_t buffer_count_max = 1U << buffer_count_max_log2;
FIFO<StreamBuffer*> fifo_buffers_empty;
FIFO<StreamBuffer*> fifo_buffers_full;
std::array<StreamBuffer, buffer_count_max> buffers{};
std::array<StreamBuffer*, buffer_count_max> buffers_empty{};
std::array<StreamBuffer*, buffer_count_max> buffers_full{};
StreamBuffer* active_buffer{nullptr};
ReplayConfig* const config{nullptr};
std::unique_ptr<uint8_t[]> data{};
};
#endif/*__STREAM_OUTPUT_H__*/
#endif /*__STREAM_OUTPUT_H__*/