소스 검색

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 년 전
부모
커밋
7d72ed688c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      Marlin/stepper.h

+ 1
- 1
Marlin/stepper.h 파일 보기

@@ -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…
취소
저장