diff options
author | Joaquim <joaquim.org@gmail.com> | 2021-04-26 21:29:48 +0100 |
---|---|---|
committer | Joaquim <joaquim.org@gmail.com> | 2021-04-26 21:29:48 +0100 |
commit | cd0d85dff95bbc5f285d92eb78a642aab1ae4b8b (patch) | |
tree | fc568aa2516c8c64cc55eb0d08e9a929c11b454a /src/components/rle | |
parent | 5fc07a8df7d18d1fa9c4971f2c7b69ea68db559b (diff) | |
parent | eedff2c06c292bda8dcb92fc04c67097fe72e22f (diff) |
Merge branch 'develop' of
https://github.com/JF002/InfiniTime into StepsApp
Diffstat (limited to 'src/components/rle')
-rw-r--r-- | src/components/rle/RleDecoder.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/components/rle/RleDecoder.cpp b/src/components/rle/RleDecoder.cpp index 19a90fda..df2bcb6b 100644 --- a/src/components/rle/RleDecoder.cpp +++ b/src/components/rle/RleDecoder.cpp @@ -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; } } - |