提交 0158b5ce 编写于 作者: J Jesse Zhang

Remove unnecessary "virtual" specifier.

These are classes that are only implementing an OsPrint method just so
that they can have a debug printing facility. They are not overriding
anything from a base class, so the "virtual" was just a bad habit.
Remove them.
上级 0f2c1b75
......@@ -144,7 +144,7 @@ public:
#ifdef GPOS_DEBUG
// debug print
virtual IOstream &OsPrint(IOstream &) const;
IOstream &OsPrint(IOstream &) const;
void DbgPrint() const;
#endif // GPOS_DEBUG
......
......@@ -139,7 +139,7 @@ public:
}
// print function
virtual IOstream &OsPrint(IOstream &) const;
IOstream &OsPrint(IOstream &) const;
// generate default search strategy
static CSearchStageArray *PdrgpssDefault(CMemoryPool *mp);
......
......@@ -237,7 +237,7 @@ public:
virtual ~CJoinOrder();
// print function
virtual IOstream &OsPrint(IOstream &) const;
IOstream &OsPrint(IOstream &) const;
// is this a valid join combination
BOOL IsValidJoinCombination(SComponent *comp1, SComponent *comp2) const;
......
......@@ -187,7 +187,7 @@ public:
}
// print function
IOstream &OsPrint(IOstream &) const override;
IOstream &OsPrint(IOstream &) const;
#ifdef GPOS_DEBUG
void DbgPrint();
......
......@@ -555,7 +555,7 @@ public:
CBitSet **requiredBitsOnLeft = NULL);
// print function
IOstream &OsPrint(IOstream &) const override;
IOstream &OsPrint(IOstream &) const;
IOstream &OsPrintProperty(IOstream &, SExpressionProperties &) const;
......
......@@ -47,7 +47,7 @@ public:
virtual CExpression *PexprExpand();
// print function
IOstream &OsPrint(IOstream &) const override;
IOstream &OsPrint(IOstream &) const;
}; // class CJoinOrderMinCard
......
......@@ -604,6 +604,8 @@ CJoinOrder::DeriveStats(CExpression *pexpr)
// Helper function to print a join order class
//
//---------------------------------------------------------------------------
// FIXME: the following function is completely unused even for the purpose of
// debugging, because all subclasses implement their own OsPrint
IOstream &
CJoinOrder::OsPrint(IOstream &os) const
{
......
......@@ -175,7 +175,7 @@ public:
}
// dump memory pool to given stream
virtual IOstream &OsPrint(IOstream &os);
IOstream &OsPrint(IOstream &os);
// check if a memory pool is empty
virtual void AssertEmpty(IOstream &os);
......
......@@ -55,11 +55,6 @@ public:
// key
const CTaskLocalStorage::Etlsidx m_etlsidx;
#ifdef GPOS_DEBUG
// debug print
virtual IOstream &OsPrint(IOstream &os) const = 0;
#endif // GPOS_DEBUG
}; // class CTaskLocalStorageObject
} // namespace gpos
......
......@@ -43,15 +43,6 @@ private:
CTestObject() : CTaskLocalStorageObject(CTaskLocalStorage::EtlsidxTest)
{
}
#ifdef GPOS_DEBUG
// overwrite abstract member
IOstream &
OsPrint(IOstream &os) const override
{
return os;
}
#endif // GPOS_DEBUG
};
public:
......
......@@ -163,7 +163,7 @@ public:
BOOL IsAfter(const CBucket *bucket) const;
// print function
virtual IOstream &OsPrint(IOstream &os) const;
IOstream &OsPrint(IOstream &os) const;
#ifdef GPOS_DEBUG
void DbgPrint() const;
......
......@@ -341,7 +341,7 @@ public:
}
// print function
virtual IOstream &OsPrint(IOstream &os) const;
IOstream &OsPrint(IOstream &os) const;
#ifdef GPOS_DEBUG
void DbgPrint() const;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册