sc/source/core/tool/formularesult.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
New commits: commit d4d87c35e7e166cc6df92aa5be83eb3a65c2d02a Author: Noel Grandin <n...@peralex.com> AuthorDate: Tue Jan 26 11:19:00 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Jan 26 12:33:56 2021 +0100 dynamic_cast unnecessary here Change-Id: I25b2c174bab07117849104fbc77fe3568c7f3d6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109935 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sc/source/core/tool/formularesult.cxx b/sc/source/core/tool/formularesult.cxx index 0b91a1a20d02..396f0408c27b 100644 --- a/sc/source/core/tool/formularesult.cxx +++ b/sc/source/core/tool/formularesult.cxx @@ -545,9 +545,8 @@ const OUString& ScFormulaResult::GetHybridFormula() const { if (GetType() == formula::svHybridCell) { - const ScHybridCellToken* p = dynamic_cast<const ScHybridCellToken*>(mpToken); - if (p) - return p->GetFormula(); + const ScHybridCellToken* p = static_cast<const ScHybridCellToken*>(mpToken); + return p->GetFormula(); } return EMPTY_OUSTRING; } @@ -633,7 +632,7 @@ void ScFormulaResult::SetMatrix( SCCOL nCols, SCROW nRows, const ScConstMatrixRe const ScMatrixFormulaCellToken* ScFormulaResult::GetMatrixFormulaCellToken() const { return (GetType() == formula::svMatrixCell ? - dynamic_cast<const ScMatrixFormulaCellToken*>(mpToken) : nullptr); + static_cast<const ScMatrixFormulaCellToken*>(mpToken) : nullptr); } ScMatrixFormulaCellToken* ScFormulaResult::GetMatrixFormulaCellTokenNonConst() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits