提交 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: ...@@ -144,7 +144,7 @@ public:
#ifdef GPOS_DEBUG #ifdef GPOS_DEBUG
// debug print // debug print
virtual IOstream &OsPrint(IOstream &) const; IOstream &OsPrint(IOstream &) const;
void DbgPrint() const; void DbgPrint() const;
#endif // GPOS_DEBUG #endif // GPOS_DEBUG
......
...@@ -139,7 +139,7 @@ public: ...@@ -139,7 +139,7 @@ public:
} }
// print function // print function
virtual IOstream &OsPrint(IOstream &) const; IOstream &OsPrint(IOstream &) const;
// generate default search strategy // generate default search strategy
static CSearchStageArray *PdrgpssDefault(CMemoryPool *mp); static CSearchStageArray *PdrgpssDefault(CMemoryPool *mp);
......
...@@ -237,7 +237,7 @@ public: ...@@ -237,7 +237,7 @@ public:
virtual ~CJoinOrder(); virtual ~CJoinOrder();
// print function // print function
virtual IOstream &OsPrint(IOstream &) const; IOstream &OsPrint(IOstream &) const;
// is this a valid join combination // is this a valid join combination
BOOL IsValidJoinCombination(SComponent *comp1, SComponent *comp2) const; BOOL IsValidJoinCombination(SComponent *comp1, SComponent *comp2) const;
......
...@@ -187,7 +187,7 @@ public: ...@@ -187,7 +187,7 @@ public:
} }
// print function // print function
IOstream &OsPrint(IOstream &) const override; IOstream &OsPrint(IOstream &) const;
#ifdef GPOS_DEBUG #ifdef GPOS_DEBUG
void DbgPrint(); void DbgPrint();
......
...@@ -555,7 +555,7 @@ public: ...@@ -555,7 +555,7 @@ public:
CBitSet **requiredBitsOnLeft = NULL); CBitSet **requiredBitsOnLeft = NULL);
// print function // print function
IOstream &OsPrint(IOstream &) const override; IOstream &OsPrint(IOstream &) const;
IOstream &OsPrintProperty(IOstream &, SExpressionProperties &) const; IOstream &OsPrintProperty(IOstream &, SExpressionProperties &) const;
......
...@@ -47,7 +47,7 @@ public: ...@@ -47,7 +47,7 @@ public:
virtual CExpression *PexprExpand(); virtual CExpression *PexprExpand();
// print function // print function
IOstream &OsPrint(IOstream &) const override; IOstream &OsPrint(IOstream &) const;
}; // class CJoinOrderMinCard }; // class CJoinOrderMinCard
......
...@@ -604,6 +604,8 @@ CJoinOrder::DeriveStats(CExpression *pexpr) ...@@ -604,6 +604,8 @@ CJoinOrder::DeriveStats(CExpression *pexpr)
// Helper function to print a join order class // 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 & IOstream &
CJoinOrder::OsPrint(IOstream &os) const CJoinOrder::OsPrint(IOstream &os) const
{ {
......
...@@ -175,7 +175,7 @@ public: ...@@ -175,7 +175,7 @@ public:
} }
// dump memory pool to given stream // dump memory pool to given stream
virtual IOstream &OsPrint(IOstream &os); IOstream &OsPrint(IOstream &os);
// check if a memory pool is empty // check if a memory pool is empty
virtual void AssertEmpty(IOstream &os); virtual void AssertEmpty(IOstream &os);
......
...@@ -55,11 +55,6 @@ public: ...@@ -55,11 +55,6 @@ public:
// key // key
const CTaskLocalStorage::Etlsidx m_etlsidx; const CTaskLocalStorage::Etlsidx m_etlsidx;
#ifdef GPOS_DEBUG
// debug print
virtual IOstream &OsPrint(IOstream &os) const = 0;
#endif // GPOS_DEBUG
}; // class CTaskLocalStorageObject }; // class CTaskLocalStorageObject
} // namespace gpos } // namespace gpos
......
...@@ -43,15 +43,6 @@ private: ...@@ -43,15 +43,6 @@ private:
CTestObject() : CTaskLocalStorageObject(CTaskLocalStorage::EtlsidxTest) CTestObject() : CTaskLocalStorageObject(CTaskLocalStorage::EtlsidxTest)
{ {
} }
#ifdef GPOS_DEBUG
// overwrite abstract member
IOstream &
OsPrint(IOstream &os) const override
{
return os;
}
#endif // GPOS_DEBUG
}; };
public: public:
......
...@@ -163,7 +163,7 @@ public: ...@@ -163,7 +163,7 @@ public:
BOOL IsAfter(const CBucket *bucket) const; BOOL IsAfter(const CBucket *bucket) const;
// print function // print function
virtual IOstream &OsPrint(IOstream &os) const; IOstream &OsPrint(IOstream &os) const;
#ifdef GPOS_DEBUG #ifdef GPOS_DEBUG
void DbgPrint() const; void DbgPrint() const;
......
...@@ -341,7 +341,7 @@ public: ...@@ -341,7 +341,7 @@ public:
} }
// print function // print function
virtual IOstream &OsPrint(IOstream &os) const; IOstream &OsPrint(IOstream &os) const;
#ifdef GPOS_DEBUG #ifdef GPOS_DEBUG
void DbgPrint() const; void DbgPrint() const;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册