Przeglądaj źródła

Fix compatibility macros

Marcio T 3 lat temu
rodzic
commit
9bbe9455cf

+ 4
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h Wyświetl plik

@@ -206,6 +206,10 @@
206 206
 
207 207
   // Define macros for compatibility
208 208
 
209
+  // Use NUM_ARGS(__VA_ARGS__) to get the number of variadic arguments
210
+  #define _NUM_ARGS(_,Z,Y,X,W,V,U,T,S,R,Q,P,O,N,M,L,K,J,I,H,G,F,E,D,C,B,A,OUT,...) OUT
211
+  #define NUM_ARGS(V...) _NUM_ARGS(0,V,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)
212
+
209 213
   #define _CAT(a,V...) a##V
210 214
   #define CAT(a,V...) _CAT(a,V)
211 215
 

Ładowanie…
Anuluj
Zapisz