diff options
author | Noel Grandin <noel@peralex.com> | 2015-06-09 08:55:13 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-06-09 10:06:57 +0200 |
commit | 81b954718f0cdac6873927e869b3e41f863562e7 (patch) | |
tree | 3e12a2cb35b263ea4d4e49b61af2ca8b733c5c28 /connectivity/source | |
parent | aba3c3a35a0afde16e42a94ae8cb2b1f589135db (diff) |
loplugin:unnecessaryvirtuals
Improve the plugin a little.
Create a python script to process the output.
Run it again.
Change-Id: I05c21d8a21c8f4243af739c412fda0a521f9b5f0
Diffstat (limited to 'connectivity/source')
-rw-r--r-- | connectivity/source/drivers/file/fanalyzer.cxx | 11 | ||||
-rw-r--r-- | connectivity/source/drivers/file/fcode.cxx | 5 | ||||
-rw-r--r-- | connectivity/source/drivers/file/fcomp.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/inc/file/fanalyzer.hxx | 4 | ||||
-rw-r--r-- | connectivity/source/inc/file/fcode.hxx | 1 |
5 files changed, 3 insertions, 20 deletions
diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx index 00e9f387d2d7..3abf3ebea6e4 100644 --- a/connectivity/source/drivers/file/fanalyzer.cxx +++ b/connectivity/source/drivers/file/fanalyzer.cxx @@ -129,17 +129,6 @@ void OSQLAnalyzer::bindRow(OCodeList& rCodeList,const OValueRefRow& _pRow,OEvalu OOperandAttr* pAttr = PTR_CAST(OOperandAttr,(*aIter)); if (pAttr) { - if (pAttr->isIndexed() && !m_aCompiler->hasORCondition()) - { - OCode* pCode1 = *(aIter + 1); - OCode* pCode2 = *(aIter + 2); - - if (PTR_CAST(OOperand,pCode1)) - pEvaluateSet = pAttr->preProcess(PTR_CAST(OBoolOperator,pCode2), PTR_CAST(OOperand,pCode1)); - else - pEvaluateSet = pAttr->preProcess(PTR_CAST(OBoolOperator,pCode1)); - } - if (pEvaluateSet) { _rEvaluateSetList.push_back(pEvaluateSet); diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx index 73a72421903d..96793912a33e 100644 --- a/connectivity/source/drivers/file/fcode.cxx +++ b/connectivity/source/drivers/file/fcode.cxx @@ -102,11 +102,6 @@ void OOperandValue::setValue(const ORowSetValue& _rVal) m_aValue = _rVal; } -bool OOperandAttr::isIndexed() const -{ - return false; -} - OOperandParam::OOperandParam(OSQLParseNode* pNode, sal_Int32 _nPos) : OOperandRow(static_cast<sal_uInt16>(_nPos), DataType::VARCHAR) // Standard-Type { diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx index 69168cf20b9b..b901ff53376d 100644 --- a/connectivity/source/drivers/file/fcomp.cxx +++ b/connectivity/source/drivers/file/fcomp.cxx @@ -451,7 +451,7 @@ OOperand* OPredicateCompiler::execute_Operand(OSQLParseNode* pPredicateNode) thr { if (m_orgColumns->getByName(aColumnName) >>= xCol) { - pOperand = m_pAnalyzer->createOperandAttr(Reference< XColumnLocate>(m_orgColumns,UNO_QUERY)->findColumn(aColumnName),xCol,m_xIndexes); + pOperand = OSQLAnalyzer::createOperandAttr(Reference< XColumnLocate>(m_orgColumns,UNO_QUERY)->findColumn(aColumnName),xCol,m_xIndexes); } else {// Column doesn't exist in the Result-set diff --git a/connectivity/source/inc/file/fanalyzer.hxx b/connectivity/source/inc/file/fanalyzer.hxx index dc6d0febf384..2f47e6d8b519 100644 --- a/connectivity/source/inc/file/fanalyzer.hxx +++ b/connectivity/source/inc/file/fanalyzer.hxx @@ -41,7 +41,7 @@ namespace connectivity mutable bool m_bHasSelectionCode; mutable bool m_bSelectionFirstTime; - void bindRow(OCodeList& rCodeList,const OValueRefRow& _pRow,OEvaluateSetList& _rEvaluateSetList); + static void bindRow(OCodeList& rCodeList,const OValueRefRow& _pRow,OEvaluateSetList& _rEvaluateSetList); public: OSQLAnalyzer(OConnection* _pConnection); @@ -76,7 +76,7 @@ namespace connectivity inline bool evaluateRestriction() { return m_aInterpreter->start(); } void setSelectionEvaluationResult(OValueRefRow& _pRow,const ::std::vector<sal_Int32>& _rColumnMapping); void setOrigColumns(const OFileColumns& rCols); - virtual OOperandAttr* createOperandAttr(sal_Int32 _nPos, + static OOperandAttr* createOperandAttr(sal_Int32 _nPos, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xCol, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _xIndexes=NULL); }; diff --git a/connectivity/source/inc/file/fcode.hxx b/connectivity/source/inc/file/fcode.hxx index 681a3e4310d7..2c59dfd9f44b 100644 --- a/connectivity/source/inc/file/fcode.hxx +++ b/connectivity/source/inc/file/fcode.hxx @@ -108,7 +108,6 @@ namespace connectivity OOperandAttr(sal_uInt16 _nPos, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xColumn); - virtual bool isIndexed() const; virtual OEvaluateSet* preProcess(OBoolOperator* pOp, OOperand* pRight = 0) SAL_OVERRIDE; TYPEINFO_OVERRIDE(); }; |