Reformatted all the files according to clang-format style

This commit is contained in:
Avamander
2021-04-18 20:28:14 +03:00
parent e56ebb8bd6
commit 40d45d923b
179 changed files with 10119 additions and 10688 deletions

View File

@@ -2,18 +2,16 @@
using namespace Pinetime::Tools;
RleDecoder::RleDecoder(const uint8_t *buffer, size_t size) : buffer{buffer}, size{size} {
RleDecoder::RleDecoder(const uint8_t* buffer, size_t size) : buffer {buffer}, size {size} {
}
RleDecoder::RleDecoder(const uint8_t *buffer, size_t size, uint16_t foregroundColor, uint16_t backgroundColor) : RleDecoder{buffer, size} {
RleDecoder::RleDecoder(const uint8_t* buffer, size_t size, uint16_t foregroundColor, uint16_t backgroundColor) : RleDecoder {buffer, size} {
this->foregroundColor = foregroundColor;
this->backgroundColor = backgroundColor;
}
void RleDecoder::DecodeNext(uint8_t *output, size_t maxBytes) {
for (;encodedBufferIndex<size; encodedBufferIndex++) {
void RleDecoder::DecodeNext(uint8_t* output, size_t maxBytes) {
for (; encodedBufferIndex < size; encodedBufferIndex++) {
uint8_t rl = buffer[encodedBufferIndex] - processedCount;
while (rl) {
output[bp] = color >> 8;
@@ -36,4 +34,3 @@ void RleDecoder::DecodeNext(uint8_t *output, size_t maxBytes) {
color = backgroundColor;
}
}

View File

@@ -11,13 +11,13 @@ namespace Pinetime {
* Code from https://github.com/daniel-thompson/wasp-bootloader by Daniel Thompson released under the MIT license.
*/
class RleDecoder {
public:
public:
RleDecoder(const uint8_t* buffer, size_t size);
RleDecoder(const uint8_t* buffer, size_t size, uint16_t foregroundColor, uint16_t backgroundColor);
void DecodeNext(uint8_t* output, size_t maxBytes);
private:
private:
const uint8_t* buffer;
size_t size;