sc/source/core/data/patattr.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
New commits: commit b1401b2da20f12b2e22341a30bbce7c58164336a Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sun May 11 07:39:31 2025 +0200 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sun May 11 08:50:06 2025 +0200 Simplify the nullptr checks, as below in ScPatternAttr::areSame Change-Id: Ie7547a79a1367f849fa5a6769d5ed262dc174926 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185166 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx index 0e406b8c6cf8..2bbed442afb4 100644 --- a/sc/source/core/data/patattr.cxx +++ b/sc/source/core/data/patattr.cxx @@ -445,11 +445,8 @@ static bool StrCmp( const OUString* pStr1, const OUString* pStr2 ) { if (pStr1 == pStr2) return true; - if (pStr1 && !pStr2) - return false; - if (!pStr1 && pStr2) - return false; - assert(pStr1 && pStr2); + if (pStr1 == nullptr || pStr2 == nullptr) + return false; // one ptr is nullptr, not both, that would have triggered above return *pStr1 == *pStr2; }