Kaynağa Gözat

Use memset in mbl.reset to save 58 bytes

Scott Lahteine 8 yıl önce
ebeveyn
işleme
2d55862499
1 değiştirilmiş dosya ile 1 ekleme ve 3 silme
  1. 1
    3
      Marlin/mesh_bed_leveling.cpp

+ 1
- 3
Marlin/mesh_bed_leveling.cpp Dosyayı Görüntüle

@@ -31,9 +31,7 @@
31 31
   void mesh_bed_leveling::reset() {
32 32
     status = MBL_STATUS_NONE;
33 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 37
 #endif  // MESH_BED_LEVELING

Loading…
İptal
Kaydet