Skip to content

Commit a87f60f

Browse files
Apply unary operator to float.
1 parent 45f9b2b commit a87f60f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

draw.hpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ static bool drawBmpFile(fs::FS &fs, const char *path, int32_t x = 0, int32_t y =
435435
if (h < 0.999f) {
436436
continue;
437437
}
438-
h -= 1.0f;
438+
--h;
439439

440440
uint32_t pos = bmpImageoffset + row * rowSize;
441441
file.seek(pos);
@@ -444,18 +444,18 @@ static bool drawBmpFile(fs::FS &fs, const char *path, int32_t x = 0, int32_t y =
444444
file.read((uint8_t *)rgb, sizeof(rgb));
445445

446446
GFX_EXEC(startWrite());
447-
x = 0; y--;
447+
x = 0; --y;
448448
for (int col = 0; col < bmpWidth; ++col) {
449449
w += scale_x;
450450
if (w < 0.999f) {
451451
continue;
452452
}
453-
w -= 1.0f;
453+
--w;
454454
uint8_t b = rgb[col][0];
455455
uint8_t g = rgb[col][1];
456456
uint8_t r = rgb[col][2];
457457
GFX_EXEC(drawPixel(x + offX, y + offY, GFX_EXEC(color565(r, g, b))));
458-
x++;
458+
++x;
459459
}
460460
GFX_EXEC(endWrite());
461461
}

0 commit comments

Comments
 (0)