Reformatted all the files according to clang-format style
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user