From e7b72c4a44056c9004df9c8b584af3493fb03cfb Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 5 Aug 2016 16:44:20 +0300 Subject: [PATCH] Fix broken build on MSVC. --HG-- branch : develop --- src/libs/vlayout/vbank.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/libs/vlayout/vbank.cpp b/src/libs/vlayout/vbank.cpp index 53e402dc1..e127da03c 100644 --- a/src/libs/vlayout/vbank.cpp +++ b/src/libs/vlayout/vbank.cpp @@ -50,6 +50,14 @@ Q_LOGGING_CATEGORY(lBank, "layout.bank") #pragma warning( pop ) #endif +// An annoying char define, from the Windows team in +// #define small char +// http://stuartjames.info/Journal/c--visual-studio-2012-vs2012--win8--converting-projects-up-some-conflicts-i-found.aspx +#if defined (Q_OS_WIN) && defined (Q_CC_MSVC) +#pragma push_macro("small") +#undef small +#endif + //--------------------------------------------------------------------------------------------------------------------- VBank::VBank() :details(QVector()), unsorted(QHash()), big(QHash()), @@ -423,3 +431,7 @@ void VBank::SqMaxMin(qint64 &sMax, qint64 &sMin) const } } + +#if defined (Q_OS_WIN) && defined (Q_CC_MSVC) +#pragma pop_macro("small") +#endif