summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-11-22 15:36:33 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-11-22 21:58:25 +0100
commit7b6f9b6db7eab2c95b010f542a237dce5350ee73 (patch)
tree5b48186fb351a93561e2e4659672da4f2764827d
parente796f0b499e1eb2eede7e5e1524d2ebb85601b47 (diff)
coverity#1441483 try and silence bogus Using invalid iterator
Change-Id: I312cef93a0cef48207a3b7f5165dd48d702de3c6 Reviewed-on: https://gerrit.libreoffice.org/63810 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--svx/source/accessibility/ChildrenManagerImpl.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx
index 0485b35d24ab..928438bd6ff2 100644
--- a/svx/source/accessibility/ChildrenManagerImpl.cxx
+++ b/svx/source/accessibility/ChildrenManagerImpl.cxx
@@ -737,8 +737,7 @@ bool ChildrenManagerImpl::ReplaceChild (
auto I = std::find_if(maVisibleChildren.begin(), maVisibleChildren.end(),
[&pCurrentChild](const ChildDescriptor& rChild) { return rChild.GetAccessibleShape() == pCurrentChild; });
- bool bResult = I != maVisibleChildren.end();
- if (bResult)
+ if (I != maVisibleChildren.end())
{
// Dispose the current child and send an event about its deletion.
pCurrentChild->dispose();
@@ -754,12 +753,13 @@ bool ChildrenManagerImpl::ReplaceChild (
AccessibleEventId::CHILD,
uno::makeAny (I->mxAccessibleShape),
uno::Any());
+
+ return true;
}
// When not found among the visible children we have to search the list
// of accessible shapes. This is not yet implemented.
-
- return bResult;
+ return false;
}
// Add the impl method for IAccessibleParent interface