From c6f1337f5c871843af7d2905b1eed0e217078cdb Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 28 Apr 2016 17:59:52 -0700 Subject: [PATCH] NOOP macro for do-nothing macros --- Marlin/macros.h | 2 ++ Marlin/ultralcd.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Marlin/macros.h b/Marlin/macros.h index 5f53ee987c..69ecc6fdb8 100644 --- a/Marlin/macros.h +++ b/Marlin/macros.h @@ -60,4 +60,6 @@ #define PENDING(NOW,SOON) ((long)(NOW-(SOON))<0) #define ELAPSED(NOW,SOON) (!PENDING(NOW,SOON)) +#define NOOP do{}while(0) + #endif //__MACROS_H diff --git a/Marlin/ultralcd.h b/Marlin/ultralcd.h index 9665c2ce9c..e20f5cc332 100644 --- a/Marlin/ultralcd.h +++ b/Marlin/ultralcd.h @@ -156,8 +156,8 @@ FORCE_INLINE void lcd_reset_alert_level() {} FORCE_INLINE bool lcd_detected(void) { return true; } - #define LCD_MESSAGEPGM(x) do{}while(0) - #define LCD_ALERTMESSAGEPGM(x) do{}while(0) + #define LCD_MESSAGEPGM(x) NOOP + #define LCD_ALERTMESSAGEPGM(x) NOOP #endif //ULTRA_LCD