[Libreoffice-commits] core.git: sc/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jan 26 11:33:42 UTC 2021
sc/source/core/tool/formularesult.cxx | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
New commits:
commit 7383b518af160d89cba19429980141c4d400387f
Author: Noel Grandin <noel at peralex.com>
AuthorDate: Tue Jan 26 11:14:51 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Jan 26 12:33:00 2021 +0100
tdf#92456 dynamic_cast to static_cast
the dynamic_cast is unnecessary here, we already know the type
from GetType(), and is shaves 3% off the time for this bug
Change-Id: Ib3afa45134d68c261cbdaf04521e0e742035f926
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109934
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sc/source/core/tool/formularesult.cxx b/sc/source/core/tool/formularesult.cxx
index 91af2589aa40..0b91a1a20d02 100644
--- a/sc/source/core/tool/formularesult.cxx
+++ b/sc/source/core/tool/formularesult.cxx
@@ -284,9 +284,8 @@ bool ScFormulaResult::IsEmptyDisplayedAsString() const
break;
case formula::svHybridCell:
{
- const ScHybridCellToken* p = dynamic_cast<const ScHybridCellToken*>(mpToken);
- if (p)
- return p->IsEmptyDisplayedAsString();
+ const ScHybridCellToken* p = static_cast<const ScHybridCellToken*>(mpToken);
+ return p->IsEmptyDisplayedAsString();
}
break;
default:
More information about the Libreoffice-commits
mailing list