diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-06-12 13:21:55 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-06-12 13:51:02 +0100 |
commit | 5f2e7b7bcffef6c45b826adc130baee9a2d918f6 (patch) | |
tree | 0d6359c6846a8ba47fd1323aded0918d555b14ef /connectivity | |
parent | 0d003606a4cb8e15d0d26b245f72620e577a5282 (diff) |
coverity#1306211 Logically dead code
results from the chain of...
commit 81b954718f0cdac6873927e869b3e41f863562e7
Author: Noel Grandin <noel@peralex.com>
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 <caolanm@redhat.com>
Date: Sat Apr 4 21:09:58 2015 +0100
and no user of OFILEOperandAttr left now either
commit c614370677d4b0605c061d5380072c4bae50cb6a
Author: Caolán McNamara <caolanm@redhat.com>
Date: Sat Apr 4 21:08:41 2015 +0100
no user of OFILEAnalyzer anymore
Change-Id: I9eb5b10d4c1f8b4d0876a0c172bbe01acaa0bb72
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/file/fanalyzer.cxx | 16 | ||||
-rw-r--r-- | connectivity/source/inc/file/fanalyzer.hxx | 2 |
2 files changed, 4 insertions, 14 deletions
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<sal_Int32>* OSQLAnalyzer::bindEvaluationRow(OValueRefRow& _pRow) { OEvaluateSetList aEvaluateSetList; - bindRow( m_aCompiler->m_aCodeList,_pRow,aEvaluateSetList); + bindRow(m_aCompiler->m_aCodeList,_pRow); ::std::vector<sal_Int32>* 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); |