From cc3a7ceea3322080d0607b4af7d0fa2b2f0e6c0e Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 28 Jul 2021 11:53:06 -0600 Subject: [PATCH] Fix macro-in-macro invocation ../src/hb-ot-color-colr-table.hh:980:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive] \#if COLRV1_ENABLE_SUBSETTING == 1 --- src/hb-ot-color-colr-table.hh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/hb-ot-color-colr-table.hh b/src/hb-ot-color-colr-table.hh index 333e8b986..007ff3f47 100644 --- a/src/hb-ot-color-colr-table.hh +++ b/src/hb-ot-color-colr-table.hh @@ -977,14 +977,11 @@ struct COLR return_trace (c->check_struct (this) && (this+baseGlyphsZ).sanitize (c, numBaseGlyphs) && (this+layersZ).sanitize (c, numLayers) && -#if COLRV1_ENABLE_SUBSETTING == 1 - (version == 0 || (version == 1 && - baseGlyphsV1List.sanitize (c, this) && - layersV1.sanitize (c, this) && - varStore.sanitize (c, this)))); -#else - (version == 0)); -#endif + (version == 0 || + (COLRV1_ENABLE_SUBSETTING && version == 1 && + baseGlyphsV1List.sanitize (c, this) && + layersV1.sanitize (c, this) && + varStore.sanitize (c, this)))); } template