forked from qt-creator/qt-creator
Fixed compiler warning about non-virtual destructor.
This commit is contained in:
@@ -69,6 +69,7 @@ private:
|
|||||||
enum OpType { UnaryOp, BinaryOp, TernaryOp };
|
enum OpType { UnaryOp, BinaryOp, TernaryOp };
|
||||||
Operator(const QString &code, const QString &repr)
|
Operator(const QString &code, const QString &repr)
|
||||||
: code(code), repr(repr) { }
|
: code(code), repr(repr) { }
|
||||||
|
virtual ~Operator() {}
|
||||||
virtual const QString makeExpr(const QStringList &exprs) const=0;
|
virtual const QString makeExpr(const QStringList &exprs) const=0;
|
||||||
virtual OpType type() const=0;
|
virtual OpType type() const=0;
|
||||||
|
|
||||||
@@ -165,7 +166,7 @@ private:
|
|||||||
QuestionMarkOperator() : Operator("qu", "") { }
|
QuestionMarkOperator() : Operator("qu", "") { }
|
||||||
virtual const QString makeExpr(const QStringList &exprs) const
|
virtual const QString makeExpr(const QStringList &exprs) const
|
||||||
{
|
{
|
||||||
Q_ASSERT(exprs.size() == 2);
|
Q_ASSERT(exprs.size() == 3);
|
||||||
return exprs.first() + " ? " + exprs.at(1) + " : " + exprs.at(2);
|
return exprs.first() + " ? " + exprs.at(1) + " : " + exprs.at(2);
|
||||||
}
|
}
|
||||||
OpType type() const { return TernaryOp; }
|
OpType type() const { return TernaryOp; }
|
||||||
|
Reference in New Issue
Block a user