QVector instead std::vector.

--HG--
branch : feature
This commit is contained in:
dismine 2014-04-26 11:00:42 +03:00
parent 541a5becbd
commit 5c3845ff00
6 changed files with 9 additions and 9 deletions

View file

@ -748,7 +748,7 @@ void QmuParserBase::SetExpr(const string_type &a_sExpr)
\throw exception_type If the function token is not a string function
*/
QmuParserBase::token_type QmuParserBase::ApplyStrFunc(const token_type &a_FunTok,
const std::vector<token_type> &a_vArg) const
const QVector<token_type> &a_vArg) const
{
if (a_vArg.back().GetCode()!=cmSTRING)
Error(ecSTRING_EXPECTED, m_pTokenReader->GetPos(), a_FunTok.GetAsString());
@ -824,7 +824,7 @@ void QmuParserBase::SetExpr(const string_type &a_sExpr)
// Collect the numeric function arguments from the value stack and store them
// in a vector
std::vector<token_type> stArg;
QVector<token_type> stArg;
for (int i=0; i<iArgNumerical; ++i)
{
stArg.push_back( a_stVal.pop() );

View file

@ -71,10 +71,10 @@ private:
typedef qreal (QmuParserBase::*ParseFunction)() const;
/** \brief Type used for storing an array of values. */
typedef std::vector<qreal> valbuf_type;
typedef QVector<qreal> valbuf_type;
/** \brief Type for a vector of strings. */
typedef std::vector<string_type> stringbuf_type;
typedef QVector<string_type> stringbuf_type;
/** \brief Typedef for the token reader. */
typedef QmuParserTokenReader token_reader_type;
@ -245,7 +245,7 @@ private:
void ApplyFunc(QStack<token_type> &a_stOpt, QStack<token_type> &a_stVal, int iArgCount) const;
token_type ApplyStrFunc(const token_type &a_FunTok,
const std::vector<token_type> &a_vArg) const;
const QVector<token_type> &a_vArg) const;
int GetOprtPrecedence(const token_type &a_Tok) const;
EOprtAssociativity GetOprtAssociativity(const token_type &a_Tok) const;

View file

@ -90,7 +90,7 @@ private:
typedef QmuParserToken<qreal, string_type> token_type;
/** \brief Token vector for storing the RPN. */
typedef std::vector<SToken> rpn_type;
typedef QVector<SToken> rpn_type;
/** \brief Position in the Calculation array. */
unsigned m_iStackPos;

View file

@ -110,7 +110,7 @@ public:
string_type operator[](unsigned a_iIdx) const;
private:
std::vector<string_type> m_vErrMsg; ///< A vector with the predefined error messages
QVector<string_type> m_vErrMsg; ///< A vector with the predefined error messages
static const self_type m_Instance; ///< The instance pointer
};

View file

@ -1228,7 +1228,7 @@ namespace qmu
try
{
// Test copy constructor
std::vector<qmu::QmuParser> vParser;
QVector<qmu::QmuParser> vParser;
vParser.push_back(*(p1.get()));
qmu::QmuParser p2 = vParser[0]; // take parser from vector

View file

@ -183,7 +183,7 @@ namespace qmu
void Run();
private:
std::vector<testfun_type> m_vTestFun;
QVector<testfun_type> m_vTestFun;
void AddTest(testfun_type a_pFun);
// Test Double Parser