Pārlūkot izejas kodu

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 gadus atpakaļ
vecāks
revīzija
7d72ed688c
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1
    1
      Marlin/stepper.h

+ 1
- 1
Marlin/stepper.h Parādīt failu

@@ -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
     //

Notiek ielāde…
Atcelt
Saglabāt