Browse Source

Use memset in mbl.reset to save 58 bytes

Scott Lahteine 8 years ago
parent
commit
2d55862499
1 changed files with 1 additions and 3 deletions
  1. 1
    3
      Marlin/mesh_bed_leveling.cpp

+ 1
- 3
Marlin/mesh_bed_leveling.cpp View File

31
   void mesh_bed_leveling::reset() {
31
   void mesh_bed_leveling::reset() {
32
     status = MBL_STATUS_NONE;
32
     status = MBL_STATUS_NONE;
33
     z_offset = 0;
33
     z_offset = 0;
34
-    for (int8_t y = MESH_NUM_Y_POINTS; y--;)
35
-      for (int8_t x = MESH_NUM_X_POINTS; x--;)
36
-        z_values[y][x] = 0;
34
+    memset(z_values, 0, sizeof(z_values));
37
   }
35
   }
38
 
36
 
39
 #endif  // MESH_BED_LEVELING
37
 #endif  // MESH_BED_LEVELING

Loading…
Cancel
Save