diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-03-10 13:07:45 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-03-10 15:44:58 +0000 |
commit | b6d6dab920a9e14a6fe9c61446da64ab62dcbfdf (patch) | |
tree | 0b80eb631d6869ad1c3c06857909c08c9f5d3480 /dbaccess | |
parent | 441523b0df8983fb34409a5f4e25dde571be1af7 (diff) |
V668 no sense in testing the result of new against null
Change-Id: I1cff71d15f4d1b5ee47cc734b3fc2168d7f99201
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/dlg/ConnectionHelper.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/WNameMatch.cxx | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index eeb3bd442440..ec19a524f369 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -548,10 +548,10 @@ namespace dbaui const bool bExists = bIsFile? aCheckExistence.isDocument(): aCheckExistence.isFolder(); eExists = bExists? PATH_EXIST: PATH_NOT_EXIST; } - catch(const Exception&) + catch (const Exception&) { - eExists = ( pHandler && pHandler->isDoesNotExist() ) ? PATH_NOT_EXIST: (bIsFile ? PATH_NOT_EXIST : PATH_NOT_KNOWN); - } + eExists = pHandler->isDoesNotExist() ? PATH_NOT_EXIST : (bIsFile ? PATH_NOT_EXIST : PATH_NOT_KNOWN); + } return eExists; } bool OConnectionHelper::PreNotify( NotifyEvent& _rNEvt ) diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx index 8126f1cf804a..6ff753110814 100644 --- a/dbaccess/source/ui/misc/WNameMatch.cxx +++ b/dbaccess/source/ui/misc/WNameMatch.cxx @@ -363,8 +363,7 @@ void OColumnTreeBox::InitEntry(SvTreeListEntry* pEntry, const OUString& rStr, co { DBTreeListBox::InitEntry(pEntry, rStr, rImg1, rImg2, eButtonKind); SvLBoxString* pString = new OColumnString(pEntry, 0, rStr,false); - if (pString) - pEntry->ReplaceItem( pString, pEntry->ItemCount() - 1 ); + pEntry->ReplaceItem( pString, pEntry->ItemCount() - 1 ); } bool OColumnTreeBox::Select( SvTreeListEntry* pEntry, bool bSelect ) |