diff --git a/src/shared/proparser/profileevaluator.cpp b/src/shared/proparser/profileevaluator.cpp index b0046674afcc4ddbff658b56fac735a3185d9b31..78ce37439a661d67bc93d7cf721cba169ec41f66 100644 --- a/src/shared/proparser/profileevaluator.cpp +++ b/src/shared/proparser/profileevaluator.cpp @@ -65,6 +65,15 @@ #define QT_PCLOSE pclose #endif +// Be fast even for debug builds +#ifdef __GNUC__ +# define ALWAYS_INLINE inline __attribute__((always_inline)) +#elif defined(_MSC_VER) +# define ALWAYS_INLINE __forceinline +#else +# define ALWAYS_INLINE inline +#endif + using namespace ProFileEvaluatorInternal; QT_BEGIN_NAMESPACE @@ -291,7 +300,7 @@ public: bool evaluateFileInto(const QString &fileName, QHash<ProString, ProStringList> *values, FunctionDefs *defs); - static inline VisitReturn returnBool(bool b) + static ALWAYS_INLINE VisitReturn returnBool(bool b) { return b ? ReturnTrue : ReturnFalse; } QList<ProStringList> prepareFunctionArgs(const ProString &arguments); @@ -1772,16 +1781,9 @@ QString ProFileEvaluator::Private::currentDirectory() const return cur->directoryName(); } -// Be fast even for debug builds -#ifdef __GNUC__ -# define ALWAYS_INLINE __attribute__((always_inline)) -#else -# define ALWAYS_INLINE -#endif - // The (QChar*)current->constData() constructs below avoid pointless detach() calls // FIXME: This is inefficient. Should not make new string if it is a straight subsegment -static inline void ALWAYS_INLINE appendChar(ushort unicode, +static ALWAYS_INLINE void appendChar(ushort unicode, QString *current, QChar **ptr, ProString *pending) { if (!pending->isEmpty()) {