summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-24 09:23:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-24 10:05:54 +0200
commita975225678c00272fc6e2ee2c85e6fe00a2204f1 (patch)
tree47aa7fdcd49221fd3084b9d77418b6690b7bc0e0 /linguistic
parent78a3a304871eb3eb861a49ed00345b54fba01114 (diff)
clang-tidy readability-simplify-boolean-expr in hwpfilter..lotuswordpro
Change-Id: I945d3fe6af5f88937b341dfc3696bf1d36344862 Reviewed-on: https://gerrit.libreoffice.org/36874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/source/dicimp.cxx5
-rw-r--r--linguistic/source/dlistimp.cxx5
-rw-r--r--linguistic/source/misc.cxx4
3 files changed, 3 insertions, 11 deletions
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx
index 4eac9e2a958f..266ab5a9f7a8 100644
--- a/linguistic/source/dicimp.cxx
+++ b/linguistic/source/dicimp.cxx
@@ -130,10 +130,7 @@ sal_Int16 ReadDicVersion( SvStreamPtr &rpStream, sal_uInt16 &nLng, bool &bNeg )
// type: negative / positive
if (getTag(aLine, "type: ", aTagValue))
{
- if (aTagValue == "negative")
- bNeg = true;
- else
- bNeg = false;
+ bNeg = aTagValue == "negative";
}
if (aLine.indexOf("---") != -1) // end of header
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index 05b6c81ee741..64bd279a95aa 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -834,10 +834,7 @@ static bool IsVers2OrNewer( const OUString& rFileURL, sal_uInt16& nLng, bool& bN
SvStreamPtr pStream = SvStreamPtr( utl::UcbStreamHelper::CreateStream( xStream ) );
int nDicVersion = ReadDicVersion(pStream, nLng, bNeg);
- if (2 == nDicVersion || nDicVersion >= 5)
- return true;
-
- return false;
+ return 2 == nDicVersion || nDicVersion >= 5;
}
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index 86dfb831ab2d..f2c9e901e3aa 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -110,9 +110,7 @@ bool LinguIsUnspecified( const OUString & rBcp47 )
{
if (rBcp47.getLength() != 3)
return false;
- if (rBcp47 == "zxx" || rBcp47 == "und" || rBcp47 == "mul")
- return true;
- return false;
+ return rBcp47 == "zxx" || rBcp47 == "und" || rBcp47 == "mul";
}
static inline sal_Int32 Minimum( sal_Int32 n1, sal_Int32 n2, sal_Int32 n3 )