vcl/source/control/roadmapwizard.cxx | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-)
New commits: commit 804f4e8ae071c7a73c64b6327f251c6a649468f0 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Jun 21 09:23:42 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Jun 21 13:47:12 2021 +0200 cid#1486243 'Constant' variable guards dead code Change-Id: I1bc2a7555f6d129526cabbebb8b88190e3ec3a4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117545 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/control/roadmapwizard.cxx b/vcl/source/control/roadmapwizard.cxx index 8b7116e75282..9f574ef19635 100644 --- a/vcl/source/control/roadmapwizard.cxx +++ b/vcl/source/control/roadmapwizard.cxx @@ -319,16 +319,6 @@ namespace vcl } } - // can we advance from the current page? - bool bCurrentPageCanAdvance = true; - TabPage* pCurrentPage = GetPage( getCurrentState() ); - if ( pCurrentPage ) - { - const IWizardPageController* pController = nullptr; - OSL_ENSURE( pController != nullptr, "RoadmapWizard::implUpdateRoadmap: no controller for the current page!" ); - bCurrentPageCanAdvance = !pController || pController->canAdvance(); - } - // now, we have to remove all items after nCurrentStatePathIndex, and insert the items from the active // path, up to (excluding) nUpperStepBoundary RoadmapTypes::ItemIndex nLoopUntil = ::std::max( nUpperStepBoundary, m_xRoadmapImpl->pRoadmap->GetItemCount() ); @@ -376,13 +366,7 @@ namespace vcl ); } - // if the item is *after* the current state, but the current page does not - // allow advancing, the disable the state. This relieves derived classes - // from disabling all future states just because the current state does not - // (yet) allow advancing. - const bool bUnconditionedDisable = !bCurrentPageCanAdvance && ( nItemIndex > nCurrentStatePathIndex ); - const bool bEnable = !bUnconditionedDisable && ( m_xRoadmapImpl->aDisabledStates.find( nState ) == m_xRoadmapImpl->aDisabledStates.end() ); - + const bool bEnable = m_xRoadmapImpl->aDisabledStates.find( nState ) == m_xRoadmapImpl->aDisabledStates.end(); m_xRoadmapImpl->pRoadmap->EnableRoadmapItem( m_xRoadmapImpl->pRoadmap->GetItemID( nItemIndex ), bEnable ); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits