Patch some loop macros

This commit is contained in:
Scott Lahteine 2018-06-26 18:49:59 -05:00
parent 229b26b02c
commit d13f76b7da

View File

@ -45,8 +45,8 @@ enum AxisEnum : unsigned char {
NO_AXIS = 0xFF NO_AXIS = 0xFF
}; };
#define LOOP_S_LE_N(VAR, S, N) for (uint8_t VAR=S; VAR<=N; VAR++) #define LOOP_S_LE_N(VAR, S, N) for (uint8_t VAR=(S); VAR<=(N); VAR++)
#define LOOP_S_L_N(VAR, S, N) for (uint8_t VAR=S; VAR<N; VAR++) #define LOOP_S_L_N(VAR, S, N) for (uint8_t VAR=(S); VAR<(N); VAR++)
#define LOOP_LE_N(VAR, N) LOOP_S_LE_N(VAR, 0, N) #define LOOP_LE_N(VAR, N) LOOP_S_LE_N(VAR, 0, N)
#define LOOP_L_N(VAR, N) LOOP_S_L_N(VAR, 0, N) #define LOOP_L_N(VAR, N) LOOP_S_L_N(VAR, 0, N)