diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-28 10:33:09 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-29 08:51:48 +0200 |
commit | 1ffba0e356608fb6dbf568248e2a953b4d7fb5d6 (patch) | |
tree | 5da59640441292421f2137bc85ee7291daed137e /io | |
parent | ce9a41dc387966c74c1af92783a97565b5af3668 (diff) |
loplugin:flatten check for throw in then clause
also make the plugin ignore the case where we have var decl's in the
clause we want to flatten, which could lead to problematic extension of
variable lifetime
Change-Id: I3061f7104e8c6a460bf74f5eac325a516ec50c59
Reviewed-on: https://gerrit.libreoffice.org/42889
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'io')
-rw-r--r-- | io/source/stm/omark.cxx | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/io/source/stm/omark.cxx b/io/source/stm/omark.cxx index 33cc84bfdf8d..4066a8a5e3c3 100644 --- a/io/source/stm/omark.cxx +++ b/io/source/stm/omark.cxx @@ -216,10 +216,8 @@ void OMarkableOutputStream::deleteMark(sal_Int32 Mark) "MarkableOutputStream::deleteMark unknown mark (" + OUString::number(Mark) + ")", *this, 0); } - else { - m_mapMarks.erase( ii ); - checkMarksAndFlush(); - } + m_mapMarks.erase( ii ); + checkMarksAndFlush(); } void OMarkableOutputStream::jumpToMark(sal_Int32 nMark) @@ -232,9 +230,7 @@ void OMarkableOutputStream::jumpToMark(sal_Int32 nMark) "MarkableOutputStream::jumpToMark unknown mark (" + OUString::number(nMark) + ")", *this, 0); } - else { - m_nCurrentPos = (*ii).second; - } + m_nCurrentPos = (*ii).second; } void OMarkableOutputStream::jumpToFurthest() @@ -631,10 +627,8 @@ void OMarkableInputStream::deleteMark(sal_Int32 Mark) "MarkableInputStream::deleteMark unknown mark (" + OUString::number(Mark) + ")", *this , 0 ); } - else { - m_mapMarks.erase( ii ); - checkMarksAndFlush(); - } + m_mapMarks.erase( ii ); + checkMarksAndFlush(); } void OMarkableInputStream::jumpToMark(sal_Int32 nMark) @@ -648,10 +642,7 @@ void OMarkableInputStream::jumpToMark(sal_Int32 nMark) "MarkableInputStream::jumpToMark unknown mark (" + OUString::number(nMark) + ")", *this , 0 ); } - else - { - m_nCurrentPos = (*ii).second; - } + m_nCurrentPos = (*ii).second; } void OMarkableInputStream::jumpToFurthest() |