Kaynağa Gözat

Revert motor_current_setting to `constexpr`

We should use `constexpr` wherever it makes sense, for its added benefits. See http://stackoverflow.com/questions/13346879/const-vs-constexpr-on-variables
Scott Lahteine 8 yıl önce
ebeveyn
işleme
7d72ed688c
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1
    1
      Marlin/stepper.h

+ 1
- 1
Marlin/stepper.h Dosyayı Görüntüle

@@ -135,7 +135,7 @@ class Stepper {
135 135
       #ifndef PWM_MOTOR_CURRENT
136 136
         #define PWM_MOTOR_CURRENT DEFAULT_PWM_MOTOR_CURRENT
137 137
       #endif
138
-      static const int motor_current_setting[3] = PWM_MOTOR_CURRENT;
138
+      static constexpr int motor_current_setting[3] = PWM_MOTOR_CURRENT;
139 139
     #endif
140 140
 
141 141
     //

Loading…
İptal
Kaydet