diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-19 08:12:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-19 10:02:39 +0200 |
commit | 2c1b7e8d6a7fa22cb91919238418816671c3a497 (patch) | |
tree | 6f356017d24dffcd25261295ab25a21b738dc835 /dbaccess | |
parent | ad18bb24d51e4f735085d50c496d28bd637dbb0b (diff) |
clang-tidy readability-container-size-empty
Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422
Reviewed-on: https://gerrit.libreoffice.org/61967
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/filter/hsqldb/fbcreateparser.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/filter/hsqldb/hsqlimport.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/formadapter.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/indexdialog.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/WColumnSelect.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/WCopyTable.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/QueryTableView.cxx | 2 |
7 files changed, 8 insertions, 8 deletions
diff --git a/dbaccess/source/filter/hsqldb/fbcreateparser.cxx b/dbaccess/source/filter/hsqldb/fbcreateparser.cxx index aed3552536e3..ad5fa6e65aa4 100644 --- a/dbaccess/source/filter/hsqldb/fbcreateparser.cxx +++ b/dbaccess/source/filter/hsqldb/fbcreateparser.cxx @@ -138,7 +138,7 @@ OUString FbCreateStmtParser::compose() const } // Firebird SQL dialect does not like parameters for TIMESTAMP - if (params.size() > 0 && columnIter->getDataType() != DataType::TIMESTAMP) + if (!params.empty() && columnIter->getDataType() != DataType::TIMESTAMP) { sSql.append("("); auto it = params.cbegin(); diff --git a/dbaccess/source/filter/hsqldb/hsqlimport.cxx b/dbaccess/source/filter/hsqldb/hsqlimport.cxx index 54fdb7411f4d..2a098476b62e 100644 --- a/dbaccess/source/filter/hsqldb/hsqlimport.cxx +++ b/dbaccess/source/filter/hsqldb/hsqlimport.cxx @@ -284,7 +284,7 @@ void HsqlImporter::parseTableRows(const IndexVector& rIndexes, Reference<XInputStream> xInput = xStream->getInputStream(); rowInput.setInputStream(xInput); - if (rIndexes.size() > 0) + if (!rIndexes.empty()) { HsqlBinaryNode aPrimaryNode{ rIndexes.at(0) }; processTree(aPrimaryNode, rowInput, rColTypes, sTableName, rIndexes.size()); @@ -313,7 +313,7 @@ void HsqlImporter::importHsqlDatabase() auto statements = parser.getCreateStatements(); - if (statements.size() < 1 && !pException) + if (statements.empty() && !pException) { SAL_WARN("dbaccess", "dbashql: there is nothing to import"); return; // there is nothing to import diff --git a/dbaccess/source/ui/browser/formadapter.cxx b/dbaccess/source/ui/browser/formadapter.cxx index cc6b13e6e2f8..d2a0baaafa5c 100644 --- a/dbaccess/source/ui/browser/formadapter.cxx +++ b/dbaccess/source/ui/browser/formadapter.cxx @@ -1484,7 +1484,7 @@ Type SAL_CALL SbaXFormAdapter::getElementType() sal_Bool SAL_CALL SbaXFormAdapter::hasElements() { - return m_aChildren.size() > 0; + return !m_aChildren.empty(); } // css::container::XIndexContainer diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx index 4934f79d886a..30f94d19f973 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -677,7 +677,7 @@ namespace dbaui bool DbaIndexDialog::implCheckPlausibility(const Indexes::const_iterator& _rPos) { // need at least one field - if (0 == _rPos->aFields.size()) + if (_rPos->aFields.empty()) { std::unique_ptr<weld::MessageDialog> xError(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Warning, VclButtonsType::Ok, diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx index b790b651bbcc..b5842210655e 100644 --- a/dbaccess/source/ui/misc/WColumnSelect.cxx +++ b/dbaccess/source/ui/misc/WColumnSelect.cxx @@ -184,7 +184,7 @@ bool OWizColumnSelect::LeavePage() if ( m_pParent->GetPressedButton() == OCopyTableWizard::WIZARD_NEXT || m_pParent->GetPressedButton() == OCopyTableWizard::WIZARD_FINISH ) - return m_pParent->getDestColumns().size() != 0; + return !m_pParent->getDestColumns().empty(); else return true; } diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx index 7d49411122a5..0660be262c9b 100644 --- a/dbaccess/source/ui/misc/WCopyTable.cxx +++ b/dbaccess/source/ui/misc/WCopyTable.cxx @@ -661,7 +661,7 @@ void OCopyTableWizard::construct() m_pbNext->GrabFocus(); - if (m_vDestColumns.size()) + if (!m_vDestColumns.empty()) // source is a html or rtf table m_pbNext->SetStyle(m_pbFinish->GetStyle() | WB_DEFBUTTON); else diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx index 2e462c444dac..4ac149299450 100644 --- a/dbaccess/source/ui/querydesign/QueryTableView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx @@ -209,7 +209,7 @@ sal_Int32 OQueryTableView::CountTableAlias(const OUString& rName, sal_Int32& rMa void OQueryTableView::ReSync() { TTableWindowData& rTabWinDataList = m_pView->getController().getTableWindowData(); - OSL_ENSURE((getTableConnections().size()==0) && (GetTabWinMap().size()==0), + OSL_ENSURE((getTableConnections().empty()) && (GetTabWinMap().empty()), "before calling OQueryTableView::ReSync() please call ClearAll !"); // I need a collection of all window names that cannot be created so that I do not initialize connections for them. |