From 3c94324811d66722489c216c4ffc89fcca7fdba5 Mon Sep 17 00:00:00 2001 From: David P Hilton Date: Sun, 28 Oct 2018 10:34:39 -0600 Subject: use sum of 'defined' instead of logic --- workspace/TS100/inc/hardware.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workspace/TS100/inc/hardware.h b/workspace/TS100/inc/hardware.h index dc215769..0b70f227 100644 --- a/workspace/TS100/inc/hardware.h +++ b/workspace/TS100/inc/hardware.h @@ -19,9 +19,9 @@ enum Orientation { ORIENTATION_FLAT = 3 }; -#if defined(MODEL_TS100) && defined(MODEL_TS80) +#if defined(MODEL_TS100) + defined(MODEL_TS80) > 1 #error "Multiple models defined!" -#elif !defined(MODEL_TS100) && !defined(MODEL_TS80) +#elif defined(MODEL_TS100) + defined(MODEL_TS80) == 0 #error "No model defined!" #endif -- cgit v1.2.3