From 5f2e7b7bcffef6c45b826adc130baee9a2d918f6 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 12 Jun 2015 13:21:55 +0100 Subject: coverity#1306211 Logically dead code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit results from the chain of... commit 81b954718f0cdac6873927e869b3e41f863562e7 Author: Noel Grandin Date: Tue Jun 9 08:55:13 2015 +0200 loplugin:unnecessaryvirtuals Improve the plugin a little. Create a python script to process the output. Run it again. commit a7cfc17991ce528eb5ceb80cfab82bfe76a73609 Author: Caolán McNamara Date: Sat Apr 4 21:09:58 2015 +0100 and no user of OFILEOperandAttr left now either commit c614370677d4b0605c061d5380072c4bae50cb6a Author: Caolán McNamara Date: Sat Apr 4 21:08:41 2015 +0100 no user of OFILEAnalyzer anymore Change-Id: I9eb5b10d4c1f8b4d0876a0c172bbe01acaa0bb72 --- connectivity/source/drivers/file/fanalyzer.cxx | 16 +++------------- connectivity/source/inc/file/fanalyzer.hxx | 2 +- 2 files changed, 4 insertions(+), 14 deletions(-) (limited to 'connectivity') diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx index 3abf3ebea6e4..396f02a3273d 100644 --- a/connectivity/source/drivers/file/fanalyzer.cxx +++ b/connectivity/source/drivers/file/fanalyzer.cxx @@ -117,23 +117,13 @@ void OSQLAnalyzer::start(OSQLParseNode* pSQLParseNode) } -void OSQLAnalyzer::bindRow(OCodeList& rCodeList,const OValueRefRow& _pRow,OEvaluateSetList& _rEvaluateSetList) +void OSQLAnalyzer::bindRow(OCodeList& rCodeList,const OValueRefRow& _pRow) { - // count criteria - // if only one criterion, and the corresponding field is indexed - // then the index will be used - OEvaluateSet* pEvaluateSet = NULL; - for (OCodeList::iterator aIter = rCodeList.begin(); aIter != rCodeList.end(); ++aIter) { OOperandAttr* pAttr = PTR_CAST(OOperandAttr,(*aIter)); if (pAttr) { - if (pEvaluateSet) - { - _rEvaluateSetList.push_back(pEvaluateSet); - pEvaluateSet = NULL; - } pAttr->bindValue(_pRow); } } @@ -146,14 +136,14 @@ void OSQLAnalyzer::bindSelectRow(const OValueRefRow& _pRow) for ( ::std::vector< TPredicates >::iterator aIter = m_aSelectionEvaluations.begin(); aIter != m_aSelectionEvaluations.end();++aIter) { if ( aIter->first.is() ) - bindRow( aIter->first->m_aCodeList,_pRow,aEvaluateSetList); + bindRow(aIter->first->m_aCodeList,_pRow); } } ::std::vector* OSQLAnalyzer::bindEvaluationRow(OValueRefRow& _pRow) { OEvaluateSetList aEvaluateSetList; - bindRow( m_aCompiler->m_aCodeList,_pRow,aEvaluateSetList); + bindRow(m_aCompiler->m_aCodeList,_pRow); ::std::vector* pKeySet = NULL; OEvaluateSet* pEvaluateSet = NULL; diff --git a/connectivity/source/inc/file/fanalyzer.hxx b/connectivity/source/inc/file/fanalyzer.hxx index 2f47e6d8b519..057ea811c84f 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; - static void bindRow(OCodeList& rCodeList,const OValueRefRow& _pRow,OEvaluateSetList& _rEvaluateSetList); + static void bindRow(OCodeList& rCodeList,const OValueRefRow& _pRow); public: OSQLAnalyzer(OConnection* _pConnection); -- cgit