Parcourir la source

Use memset in mbl.reset to save 58 bytes

Scott Lahteine il y a 9 ans
Parent
révision
2d55862499
1 fichiers modifiés avec 1 ajouts et 3 suppressions
  1. 1
    3
      Marlin/mesh_bed_leveling.cpp

+ 1
- 3
Marlin/mesh_bed_leveling.cpp Voir le fichier

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

Chargement…
Annuler
Enregistrer