From ae622df5df4094481ef4212dbe2ba8449e47871f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 25 Apr 2017 10:33:00 +0200 Subject: clang-tidy readability-simplify-boolean-expr in sfx2 Change-Id: I388e0160daf6a7359881acb82145460ad5bbbbbf Reviewed-on: https://gerrit.libreoffice.org/36929 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sfx2/source/view/classificationhelper.cxx | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'sfx2/source/view') diff --git a/sfx2/source/view/classificationhelper.cxx b/sfx2/source/view/classificationhelper.cxx index 769a0c6b5df9..907c08d13f68 100644 --- a/sfx2/source/view/classificationhelper.cxx +++ b/sfx2/source/view/classificationhelper.cxx @@ -554,10 +554,7 @@ bool SfxClassificationHelper::HasImpactLevel() return false; it = rCategory.m_aLabels.find(PROP_PREFIX_INTELLECTUALPROPERTY() + PROP_IMPACTLEVEL()); - if (it == rCategory.m_aLabels.end()) - return false; - - return true; + return it != rCategory.m_aLabels.end(); } bool SfxClassificationHelper::HasDocumentHeader() @@ -568,10 +565,7 @@ bool SfxClassificationHelper::HasDocumentHeader() SfxClassificationCategory& rCategory = itCategory->second; auto it = rCategory.m_aLabels.find(PROP_PREFIX_INTELLECTUALPROPERTY() + PROP_DOCHEADER()); - if (it == rCategory.m_aLabels.end() || it->second.isEmpty()) - return false; - - return true; + return it != rCategory.m_aLabels.end() && !it->second.isEmpty(); } bool SfxClassificationHelper::HasDocumentFooter() @@ -582,10 +576,7 @@ bool SfxClassificationHelper::HasDocumentFooter() SfxClassificationCategory& rCategory = itCategory->second; auto it = rCategory.m_aLabels.find(PROP_PREFIX_INTELLECTUALPROPERTY() + PROP_DOCFOOTER()); - if (it == rCategory.m_aLabels.end() || it->second.isEmpty()) - return false; - - return true; + return it != rCategory.m_aLabels.end() && !it->second.isEmpty(); } InfoBarType SfxClassificationHelper::GetImpactLevelType() -- cgit