diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-18 15:53:57 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-22 08:13:45 +0200 |
commit | db90e072fa0d0fe6514361cc50273aaa47563478 (patch) | |
tree | 3155f72e2285b478609159acbbbb4ca941a0392c | |
parent | 964ffdc0687c14f9a90105dab4ffdf5eb09b6231 (diff) |
loplugin:virtualdead unused params in OCacheSet
these methods do nothing except forward to their similar named variants,
so just remove them
Change-Id: I28d31bbe2c1e39fe5a9c2d7eaa9e14006213ab27
Reviewed-on: https://gerrit.libreoffice.org/81247
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | compilerplugins/clang/virtualdead.unusedparams.results | 9 | ||||
-rw-r--r-- | dbaccess/source/core/api/CacheSet.cxx | 15 | ||||
-rw-r--r-- | dbaccess/source/core/api/CacheSet.hxx | 3 | ||||
-rw-r--r-- | dbaccess/source/core/api/KeySet.cxx | 17 | ||||
-rw-r--r-- | dbaccess/source/core/api/KeySet.hxx | 5 | ||||
-rw-r--r-- | dbaccess/source/core/api/RowSetCache.cxx | 16 |
6 files changed, 9 insertions, 56 deletions
diff --git a/compilerplugins/clang/virtualdead.unusedparams.results b/compilerplugins/clang/virtualdead.unusedparams.results index 99806442c261..fda3eaf9f698 100644 --- a/compilerplugins/clang/virtualdead.unusedparams.results +++ b/compilerplugins/clang/virtualdead.unusedparams.results @@ -37,15 +37,6 @@ chart2/source/controller/dialogs/ChangingResource.hxx:30 chart2/source/controller/dialogs/ChartTypeDialogController.hxx:105 void chart::ChartTypeDialogController::fillExtraControls(const class chart::ChartTypeParameter &,const class com::sun::star::uno::Reference<class com::sun::star::chart2::XChartDocument> &,const class com::sun::star::uno::Reference<class com::sun::star::beans::XPropertySet> &,)const 011 -dbaccess/source/core/api/CacheSet.hxx:174 - _Bool dbaccess::OCacheSet::previous_checked(_Bool,) - 0 -dbaccess/source/core/api/CacheSet.hxx:175 - _Bool dbaccess::OCacheSet::absolute_checked(int,_Bool,) - 10 -dbaccess/source/core/api/CacheSet.hxx:176 - _Bool dbaccess::OCacheSet::last_checked(_Bool,) - 0 desktop/source/deployment/registry/inc/dp_backend.h:84 void dp_registry::backend::Package::processPackage_(class osl::ResettableGuard<class osl::Mutex> &,_Bool,_Bool,const class rtl::Reference<class dp_misc::AbortChannel> &,const class com::sun::star::uno::Reference<class com::sun::star::ucb::XCommandEnvironment> &,) 01111 diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx index 62020e68d4db..59a9669e4db3 100644 --- a/dbaccess/source/core/api/CacheSet.cxx +++ b/dbaccess/source/core/api/CacheSet.cxx @@ -540,21 +540,6 @@ bool OCacheSet::previous( ) return m_xDriverSet->previous(); } -bool OCacheSet::last_checked( bool /*i_bFetchRow*/) -{ - return last(); -} - -bool OCacheSet::previous_checked( bool /*i_bFetchRow*/ ) -{ - return previous(); -} - -bool OCacheSet::absolute_checked( sal_Int32 row,bool /*i_bFetchRow*/ ) -{ - return absolute(row); -} - void OCacheSet::refreshRow( ) { m_xDriverSet->refreshRow(); diff --git a/dbaccess/source/core/api/CacheSet.hxx b/dbaccess/source/core/api/CacheSet.hxx index 0fc0e5777a6e..efdd843250b4 100644 --- a/dbaccess/source/core/api/CacheSet.hxx +++ b/dbaccess/source/core/api/CacheSet.hxx @@ -171,9 +171,6 @@ namespace dbaccess virtual bool columnValuesUpdated(ORowSetValueVector::Vector& o_aCachedRow,const ORowSetValueVector::Vector& i_aRow); virtual bool updateColumnValues(const ORowSetValueVector::Vector& io_aCachedRow,ORowSetValueVector::Vector& io_aRow,const std::vector<sal_Int32>& i_aChangedColumns); virtual void fillMissingValues(ORowSetValueVector::Vector& io_aRow) const; - virtual bool previous_checked( bool i_bFetchRow ); - virtual bool absolute_checked( sal_Int32 row,bool i_bFetchRow ); - virtual bool last_checked( bool i_bFetchRow); }; } #endif // INCLUDED_DBACCESS_SOURCE_CORE_API_CACHESET_HXX diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index 137f1e3b4104..f83ac766237d 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -1040,11 +1040,6 @@ bool OKeySet::first() bool OKeySet::last( ) { - return last_checked(true); -} - -bool OKeySet::last_checked( bool /* i_bFetchRow */ ) -{ m_bInserted = m_bUpdated = m_bDeleted = false; bool bFetchedRow = fillAllRows(); @@ -1067,11 +1062,6 @@ sal_Int32 OKeySet::getRow( ) bool OKeySet::absolute( sal_Int32 row ) { - return absolute_checked(row,true); -} - -bool OKeySet::absolute_checked( sal_Int32 row, bool /* i_bFetchRow */ ) -{ m_bInserted = m_bUpdated = m_bDeleted = false; OSL_ENSURE(row,"absolute(0) isn't allowed!"); bool bFetchedRow = false; @@ -1127,7 +1117,7 @@ bool OKeySet::absolute_checked( sal_Int32 row, bool /* i_bFetchRow */ ) return m_aKeyIter != m_aKeyMap.end() && m_aKeyIter != m_aKeyMap.begin(); } -bool OKeySet::previous_checked( bool /* i_bFetchRow */ ) +bool OKeySet::previous() { m_bInserted = m_bUpdated = m_bDeleted = false; if(m_aKeyIter != m_aKeyMap.begin()) @@ -1138,11 +1128,6 @@ bool OKeySet::previous_checked( bool /* i_bFetchRow */ ) return m_aKeyIter != m_aKeyMap.begin(); } -bool OKeySet::previous( ) -{ - return previous_checked(true); -} - bool OKeySet::doTryRefetch_throw() { ensureStatement( ); diff --git a/dbaccess/source/core/api/KeySet.hxx b/dbaccess/source/core/api/KeySet.hxx index 0bd8a681beaa..cdf2e5a6946d 100644 --- a/dbaccess/source/core/api/KeySet.hxx +++ b/dbaccess/source/core/api/KeySet.hxx @@ -215,11 +215,6 @@ namespace dbaccess virtual void updateRow(const ORowSetRow& _rInsertRow,const ORowSetRow& _rOriginalRow,const connectivity::OSQLTable& _xTable ) override; virtual void deleteRow(const ORowSetRow& _rInsertRow,const connectivity::OSQLTable& _xTable ) override; virtual void insertRow( const ORowSetRow& _rInsertRow,const connectivity::OSQLTable& _xTable ) override; - - - virtual bool previous_checked( bool i_bFetchRow ) override; - virtual bool absolute_checked( sal_Int32 row,bool i_bFetchRow ) override; - virtual bool last_checked( bool i_bFetchRow) override; }; } #endif // INCLUDED_DBACCESS_SOURCE_CORE_API_KEYSET_HXX diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index a3a1de4df10a..2f71f9e4bc5d 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -705,7 +705,7 @@ void ORowSetCache::afterLast( ) if(!m_bRowCountFinal) { - m_xCacheSet->last_checked(false); + m_xCacheSet->last(); m_bRowCountFinal = true; m_nRowCount = m_xCacheSet->getRow();// + 1 removed } @@ -757,7 +757,7 @@ bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos, sal_Int32 &_nNewEndPos) if(!m_bRowCountFinal) { - if(m_xCacheSet->previous_checked(false)) // because we stand after the last row + if(m_xCacheSet->previous()) // because we stand after the last row m_nRowCount = m_xCacheSet->getRow(); // here we have the row count if(!m_nRowCount) m_nRowCount = i-1; // it can be that getRow return zero @@ -798,7 +798,7 @@ bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos, sal_Int32 &_nNewEndPos) { if(!m_xCacheSet->next()) { - if(m_xCacheSet->previous_checked(false)) // because we stand after the last row + if(m_xCacheSet->previous()) // because we stand after the last row m_nRowCount = m_xCacheSet->getRow(); // here we have the row count m_bRowCountFinal = true; } @@ -836,7 +836,7 @@ void ORowSetCache::moveWindow() // but only when we don't know it already if ( !m_bRowCountFinal ) { - bOk = m_xCacheSet->absolute_checked( m_nPosition + 1,false ); + bOk = m_xCacheSet->absolute( m_nPosition + 1 ); if ( bOk ) m_nRowCount = std::max(sal_Int32(m_nPosition+1),m_nRowCount); } @@ -844,7 +844,7 @@ void ORowSetCache::moveWindow() if(!bOk && !m_bRowCountFinal) { // because we stand after the last row - m_nRowCount = m_xCacheSet->previous_checked(false) ? m_xCacheSet->getRow() : 0; + m_nRowCount = m_xCacheSet->previous() ? m_xCacheSet->getRow() : 0; m_bRowCountFinal = true; } } @@ -1000,7 +1000,7 @@ void ORowSetCache::moveWindow() bOk = m_xCacheSet->next(); if(!bOk) { - m_xCacheSet->previous_checked(false); // because we stand after the last row + m_xCacheSet->previous(); // because we stand after the last row m_nRowCount = nPos; // here we have the row count OSL_ENSURE(nPos == m_xCacheSet->getRow(),"nPos is not valid!"); m_bRowCountFinal = true; @@ -1027,7 +1027,7 @@ void ORowSetCache::moveWindow() if ( !m_bRowCountFinal ) { - m_xCacheSet->previous_checked(false); // because we stand after the last row + m_xCacheSet->previous(); // because we stand after the last row m_nRowCount = std::max(m_nRowCount, nPos); // here we have the row count OSL_ENSURE(nPos == m_xCacheSet->getRow(),"nPos isn't valid!"); m_bRowCountFinal = true; @@ -1040,7 +1040,7 @@ void ORowSetCache::moveWindow() aIter = m_pMatrix->begin(); nPos = m_nStartPos + 1; - bCheck = m_xCacheSet->absolute_checked(nPos, true); + bCheck = m_xCacheSet->absolute(nPos); for(; !aIter->is() && bCheck;++aIter, ++nPos) { OSL_ENSURE(aIter != m_pMatrix->end(),"Invalid iterator"); |