Browse Source

Loop index can be unsigned

Saves 4 bytes of flash memory
Guðni Már Gilbert 3 years ago
parent
commit
c081e1a5ae
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Firmware/Marlin_main.cpp

+ 1 - 1
Firmware/Marlin_main.cpp

@@ -11130,7 +11130,7 @@ void uvlo_()
     eeprom_update_dword((uint32_t*)(EEPROM_FILE_POSITION), sd_position);
 
     // Store the mesh bed leveling offsets. This is 2*7*7=98 bytes, which takes 98*3.4us=333us in worst case.
-    for (int8_t mesh_point = 0; mesh_point < MESH_NUM_X_POINTS * MESH_NUM_Y_POINTS; ++ mesh_point) {
+    for (uint8_t mesh_point = 0; mesh_point < MESH_NUM_X_POINTS * MESH_NUM_Y_POINTS; ++ mesh_point) {
       uint8_t ix = mesh_point % MESH_NUM_X_POINTS; // from 0 to MESH_NUM_X_POINTS - 1
       uint8_t iy = mesh_point / MESH_NUM_X_POINTS;
       // Scale the z value to 1u resolution.