From 1ad00bfa5605f647c7359c54ca449425bf17b18c Mon Sep 17 00:00:00 2001 From: wang-bin Date: Tue, 6 Mar 2018 23:22:37 +0800 Subject: [PATCH] fix QTAV_HAVE() warning -Wexpansion-to-defined --- src/QtAV/QtAV_Global.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/QtAV/QtAV_Global.h b/src/QtAV/QtAV_Global.h index 3a488fa29..542ee8847 100644 --- a/src/QtAV/QtAV_Global.h +++ b/src/QtAV/QtAV_Global.h @@ -1,6 +1,6 @@ /****************************************************************************** QtAV: Multimedia framework based on Qt and FFmpeg - Copyright (C) 2012-2016 Wang Bin + Copyright (C) 2012-2018 Wang Bin * This file is part of QtAV @@ -168,11 +168,9 @@ Q_DECLARE_METATYPE(QtAV::MediaEndAction) #ifndef QByteArrayLiteral #define QByteArrayLiteral(str) QByteArray(str, sizeof(str) - 1) #endif -/* - * msvc sucks! can not deal with (defined(QTAV_HAVE_##FEATURE) && QTAV_HAVE_##FEATURE) - */ + // TODO: internal use. move to a private header -#define QTAV_HAVE(FEATURE) (defined QTAV_HAVE_##FEATURE && QTAV_HAVE_##FEATURE) +#define QTAV_HAVE(FEATURE) (QTAV_HAVE_##FEATURE+0) #ifndef Q_DECL_OVERRIDE #define Q_DECL_OVERRIDE