Browse Source

Fix compatibility macros

Marcio T 3 years ago
parent
commit
9bbe9455cf
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h

+ 4
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h View File

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

Loading…
Cancel
Save