summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-18 08:27:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-18 09:46:28 +0200
commit5fb66ae5595b7435e8954df31473fad15a74b8c2 (patch)
tree3b3f0ce3eafa10557a7e78b10851c97ee16c7ebf /svl
parent181a1b36ac728e3a43e054496ceb53fd3315abdb (diff)
clang-tidy readability-simplify-boolean-expr
Change-Id: I78fa01a6c803dec782488490b730af3a11814d64 Reviewed-on: https://gerrit.libreoffice.org/61902 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/misc/inethist.cxx12
-rw-r--r--svl/source/numbers/zformat.cxx9
2 files changed, 3 insertions, 18 deletions
diff --git a/svl/source/misc/inethist.cxx b/svl/source/misc/inethist.cxx
index c4d5daeea374..7c05b6ef423e 100644
--- a/svl/source/misc/inethist.cxx
+++ b/svl/source/misc/inethist.cxx
@@ -276,16 +276,8 @@ bool INetURLHistory_Impl::queryUrl (const OUString &rUrl) const
{
sal_uInt32 h = crc32 (rUrl);
sal_uInt16 k = find (h);
- if ((k < capacity()) && (m_pHash[k] == h))
- {
- // Cache hit.
- return true;
- }
- else
- {
- // Cache miss.
- return false;
- }
+ // true if cache hit
+ return (k < capacity()) && (m_pHash[k] == h);
}
/*
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 077baa7ab2e5..a817d8d191c1 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -4212,14 +4212,7 @@ bool SvNumberformat::ImpGetNumberOutput(double fNumber,
bool bSign;
if (fNumber < 0.0)
{
- if (nIx == 0) // Not in the ones at the back
- {
- bSign = true; // Formats
- }
- else
- {
- bSign = false;
- }
+ bSign = (nIx == 0); // Not in the ones at the back;
fNumber = -fNumber;
}
else