Skip to content

Commit

Permalink
refactor: remove unreachable code
Browse files Browse the repository at this point in the history
Signed-off-by: Aditya Agarwal <[email protected]>
  • Loading branch information
Aditya-A-garwal committed Feb 14, 2024
1 parent 962c91a commit 76f8597
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions include/canvasClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ class RowCompressor {

class CanvasClient {

constexpr static unsigned BUFFER_LEN = 4096;
constexpr static unsigned CLIENT_BUFFER_LEN = 4096;
constexpr static unsigned CLIENT_BUFFER_LEN = 2048;
constexpr static unsigned ROW_BUFFER_LEN = 512;

constexpr static unsigned MAX_SSID_LEN = 64;
Expand All @@ -48,17 +47,13 @@ class CanvasClient {

struct client_buffer_t {

uint8_t bytes[BUFFER_LEN];
uint8_t bytes[CLIENT_BUFFER_LEN];
unsigned size = 0;
unsigned totalSent = 0;

bool has_space(unsigned insertsize) {

return (size + insertsize) <= CLIENT_BUFFER_LEN;

if ((size + insertsize) >= CLIENT_BUFFER_LEN) {
return false;
}
}

void append(const uint8_t *insertbytes, unsigned insertsize) {
Expand Down Expand Up @@ -88,13 +83,7 @@ class CanvasClient {
uint16_t color[ROW_BUFFER_LEN];
uint8_t code[ROW_BUFFER_LEN];
};
struct buffer {

uint8_t bytes[BUFFER_LEN] {};
unsigned used = 0;
};

// static buffer buf;
static client_buffer_t client_buffer;
static row_buffer_t rowbuf;

Expand Down

0 comments on commit 76f8597

Please sign in to comment.