Removed unnecessary bit-ANDing

This commit is contained in:
Melissa LeBlanc-Williams 2019-04-01 19:52:35 -07:00
parent 8e9f75bff9
commit f1e4a2ffb9

View File

@ -216,8 +216,8 @@ void displayio_display_set_region_to_update(displayio_display_obj_t* self, uint1
self->send(self->bus, true, &self->set_column_command, 1);
if (self->single_byte_bounds) {
uint8_t data[2];
data[0] = (x0 + self->colstart) & 0xFF;
data[1] = (x1 - 1 + self->colstart) & 0xFF;
data[0] = x0 + self->colstart;
data[1] = x1 - 1 + self->colstart;
self->send(self->bus, false, (uint8_t*) data, 2);
} else {
uint16_t data[2];
@ -228,8 +228,8 @@ void displayio_display_set_region_to_update(displayio_display_obj_t* self, uint1
self->send(self->bus, true, &self->set_row_command, 1);
if (self->single_byte_bounds) {
uint8_t data[2];
data[0] = (y0 + self->rowstart) & 0xFF;
data[1] = (y1 - 1 + self->rowstart) & 0xFF;
data[0] = y0 + self->rowstart;
data[1] = y1 - 1 + self->rowstart;
self->send(self->bus, false, (uint8_t*) data, 2);
} else {
uint16_t data[2];