Fix build on Windows.
This commit is contained in:
parent
0fb54f73c7
commit
a0224bd6a2
|
@ -30,6 +30,8 @@
|
||||||
#include <QStringDataPtr>
|
#include <QStringDataPtr>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
|
#include "qmudef.h"
|
||||||
|
|
||||||
namespace qmu
|
namespace qmu
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -30,11 +30,11 @@
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <QtDebug>
|
#include <QtDebug>
|
||||||
|
#include <QtMath>
|
||||||
|
|
||||||
#include "qmuparserdef.h"
|
|
||||||
#include "qmuparsererror.h"
|
#include "qmuparsererror.h"
|
||||||
#include "../vmisc/vmath.h"
|
|
||||||
#include "../vmisc/defglobal.h"
|
#include "../vmisc/defglobal.h"
|
||||||
|
#include "qmudef.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
|
|
|
@ -100,11 +100,11 @@ void QmuParserByteCode::AddVar(qreal *a_pVar)
|
||||||
m_iMaxStackSize = qMax(m_iMaxStackSize, m_iStackPos);
|
m_iMaxStackSize = qMax(m_iMaxStackSize, m_iStackPos);
|
||||||
|
|
||||||
// optimization does not apply
|
// optimization does not apply
|
||||||
SToken tok{};
|
SToken tok; // NOLINT
|
||||||
tok.Cmd = cmVAR;
|
tok.Cmd = cmVAR;
|
||||||
tok.Val.ptr = a_pVar; // NOLINT(cppcoreguidelines-pro-type-union-access)
|
tok.Val.ptr = a_pVar;
|
||||||
tok.Val.data = 1; // NOLINT(cppcoreguidelines-pro-type-union-access)
|
tok.Val.data = 1;
|
||||||
tok.Val.data2 = 0; // NOLINT(cppcoreguidelines-pro-type-union-access)
|
tok.Val.data2 = 0;
|
||||||
m_vRPN.push_back(tok);
|
m_vRPN.push_back(tok);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,11 +128,11 @@ void QmuParserByteCode::AddVal(qreal a_fVal)
|
||||||
m_iMaxStackSize = qMax(m_iMaxStackSize, m_iStackPos);
|
m_iMaxStackSize = qMax(m_iMaxStackSize, m_iStackPos);
|
||||||
|
|
||||||
// If optimization does not apply
|
// If optimization does not apply
|
||||||
SToken tok{};
|
SToken tok; // NOLINT
|
||||||
tok.Cmd = cmVAL;
|
tok.Cmd = cmVAL;
|
||||||
tok.Val.ptr = nullptr; // NOLINT(cppcoreguidelines-pro-type-union-access)
|
tok.Val.ptr = nullptr;
|
||||||
tok.Val.data = 0; // NOLINT(cppcoreguidelines-pro-type-union-access)
|
tok.Val.data = 0;
|
||||||
tok.Val.data2 = a_fVal; // NOLINT(cppcoreguidelines-pro-type-union-access)
|
tok.Val.data2 = a_fVal;
|
||||||
m_vRPN.push_back(tok);
|
m_vRPN.push_back(tok);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,8 +140,8 @@ void QmuParserByteCode::AddVal(qreal a_fVal)
|
||||||
void QmuParserByteCode::ConstantFolding(ECmdCode a_Oprt)
|
void QmuParserByteCode::ConstantFolding(ECmdCode a_Oprt)
|
||||||
{
|
{
|
||||||
int sz = m_vRPN.size();
|
int sz = m_vRPN.size();
|
||||||
qreal &x = m_vRPN[sz-2].Val.data2, // NOLINT(cppcoreguidelines-pro-type-union-access)
|
qreal &x = m_vRPN[sz-2].Val.data2,
|
||||||
&y = m_vRPN[sz-1].Val.data2; // NOLINT(cppcoreguidelines-pro-type-union-access)
|
&y = m_vRPN[sz-1].Val.data2;
|
||||||
switch (a_Oprt)
|
switch (a_Oprt)
|
||||||
{
|
{
|
||||||
case cmLAND:
|
case cmLAND:
|
||||||
|
@ -355,7 +355,7 @@ void QmuParserByteCode::AddOp(ECmdCode a_Oprt)
|
||||||
if (not bOptimized)
|
if (not bOptimized)
|
||||||
{
|
{
|
||||||
--m_iStackPos;
|
--m_iStackPos;
|
||||||
SToken tok{};
|
SToken tok; // NOLINT
|
||||||
tok.Cmd = a_Oprt;
|
tok.Cmd = a_Oprt;
|
||||||
m_vRPN.push_back(tok);
|
m_vRPN.push_back(tok);
|
||||||
}
|
}
|
||||||
|
@ -416,7 +416,7 @@ QT_WARNING_POP
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void QmuParserByteCode::AddIfElse(ECmdCode a_Oprt)
|
void QmuParserByteCode::AddIfElse(ECmdCode a_Oprt)
|
||||||
{
|
{
|
||||||
SToken tok{};
|
SToken tok; // NOLINT
|
||||||
tok.Cmd = a_Oprt;
|
tok.Cmd = a_Oprt;
|
||||||
m_vRPN.push_back(tok);
|
m_vRPN.push_back(tok);
|
||||||
}
|
}
|
||||||
|
@ -437,7 +437,7 @@ void QmuParserByteCode::AddAssignOp(qreal *a_pVar)
|
||||||
{
|
{
|
||||||
--m_iStackPos;
|
--m_iStackPos;
|
||||||
|
|
||||||
SToken tok{};
|
SToken tok; // NOLINT
|
||||||
tok.Cmd = cmASSIGN;
|
tok.Cmd = cmASSIGN;
|
||||||
tok.Oprt.ptr = a_pVar;
|
tok.Oprt.ptr = a_pVar;
|
||||||
m_vRPN.push_back(tok);
|
m_vRPN.push_back(tok);
|
||||||
|
@ -463,7 +463,7 @@ void QmuParserByteCode::AddFun(generic_fun_type a_pFun, int a_iArgc)
|
||||||
}
|
}
|
||||||
m_iMaxStackSize = qMax(m_iMaxStackSize, m_iStackPos);
|
m_iMaxStackSize = qMax(m_iMaxStackSize, m_iStackPos);
|
||||||
|
|
||||||
SToken tok{};
|
SToken tok; // NOLINT
|
||||||
tok.Cmd = cmFUNC;
|
tok.Cmd = cmFUNC;
|
||||||
tok.Fun.argc = a_iArgc;
|
tok.Fun.argc = a_iArgc;
|
||||||
tok.Fun.ptr = a_pFun;
|
tok.Fun.ptr = a_pFun;
|
||||||
|
@ -482,7 +482,7 @@ void QmuParserByteCode::AddBulkFun(generic_fun_type a_pFun, int a_iArgc)
|
||||||
m_iStackPos = static_cast<quint32>(static_cast<int>(m_iStackPos) - a_iArgc + 1);
|
m_iStackPos = static_cast<quint32>(static_cast<int>(m_iStackPos) - a_iArgc + 1);
|
||||||
m_iMaxStackSize = qMax(m_iMaxStackSize, m_iStackPos);
|
m_iMaxStackSize = qMax(m_iMaxStackSize, m_iStackPos);
|
||||||
|
|
||||||
SToken tok{};
|
SToken tok; // NOLINT
|
||||||
tok.Cmd = cmFUNC_BULK;
|
tok.Cmd = cmFUNC_BULK;
|
||||||
tok.Fun.argc = a_iArgc;
|
tok.Fun.argc = a_iArgc;
|
||||||
tok.Fun.ptr = a_pFun;
|
tok.Fun.ptr = a_pFun;
|
||||||
|
@ -501,7 +501,7 @@ void QmuParserByteCode::AddStrFun(generic_fun_type a_pFun, int a_iArgc, int a_iI
|
||||||
{
|
{
|
||||||
m_iStackPos = static_cast<quint32>(static_cast<int>(m_iStackPos) - a_iArgc + 1);
|
m_iStackPos = static_cast<quint32>(static_cast<int>(m_iStackPos) - a_iArgc + 1);
|
||||||
|
|
||||||
SToken tok{};
|
SToken tok; // NOLINT
|
||||||
tok.Cmd = cmFUNC_STR;
|
tok.Cmd = cmFUNC_STR;
|
||||||
tok.Fun.argc = a_iArgc;
|
tok.Fun.argc = a_iArgc;
|
||||||
tok.Fun.idx = a_iIdx;
|
tok.Fun.idx = a_iIdx;
|
||||||
|
@ -519,7 +519,7 @@ void QmuParserByteCode::AddStrFun(generic_fun_type a_pFun, int a_iArgc, int a_iI
|
||||||
*/
|
*/
|
||||||
void QmuParserByteCode::Finalize()
|
void QmuParserByteCode::Finalize()
|
||||||
{
|
{
|
||||||
SToken tok{};
|
SToken tok; // NOLINT
|
||||||
tok.Cmd = cmEND;
|
tok.Cmd = cmEND;
|
||||||
m_vRPN.push_back(tok);
|
m_vRPN.push_back(tok);
|
||||||
rpn_type(m_vRPN).swap(m_vRPN); // shrink bytecode vector to fit
|
rpn_type(m_vRPN).swap(m_vRPN); // shrink bytecode vector to fit
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
|
||||||
#include "qmudef.h"
|
|
||||||
#include "qmuparserdef.h"
|
#include "qmuparserdef.h"
|
||||||
#include "qmuparsertoken.h"
|
#include "qmuparsertoken.h"
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,10 @@
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QShowEvent>
|
#include <QShowEvent>
|
||||||
|
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
||||||
|
#include "../vmisc/backport/qoverload.h"
|
||||||
|
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
DialogLayoutScale::DialogLayoutScale(bool printTiled, QWidget *parent)
|
DialogLayoutScale::DialogLayoutScale(bool printTiled, QWidget *parent)
|
||||||
:QDialog(parent),
|
:QDialog(parent),
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
#include "../vgeometry/vcubicbezierpath.h"
|
#include "../vgeometry/vcubicbezierpath.h"
|
||||||
#include "../vgeometry/vspline.h"
|
#include "../vgeometry/vspline.h"
|
||||||
#include "../vgeometry/vsplinepath.h"
|
#include "../vgeometry/vsplinepath.h"
|
||||||
|
#include "../qmuparser/qmudef.h"
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
|
|
|
@ -41,9 +41,9 @@
|
||||||
#include <new>
|
#include <new>
|
||||||
|
|
||||||
#include "../ifc/exception/vexception.h"
|
#include "../ifc/exception/vexception.h"
|
||||||
#include "../ifc/exception/vexceptionbadid.h"
|
|
||||||
#include "../ifc/xml/vabstractpattern.h"
|
#include "../ifc/xml/vabstractpattern.h"
|
||||||
#include "../qmuparser/qmutokenparser.h"
|
#include "../qmuparser/qmutokenparser.h"
|
||||||
|
#include "../qmuparser/qmudef.h"
|
||||||
#include "../vgeometry/vgobject.h"
|
#include "../vgeometry/vgobject.h"
|
||||||
#include "../vgeometry/vpointf.h"
|
#include "../vgeometry/vpointf.h"
|
||||||
#include "../vgeometry/vspline.h"
|
#include "../vgeometry/vspline.h"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user