From 089c21ba76f29556175dda9b88c20d4b0a7a670a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Mon, 26 Nov 2007 23:55:16 +0000 Subject: [PATCH] no need to cast anymore git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21810 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiView.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index efb877ffe4..bdd32b86fc 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -705,15 +705,14 @@ GuiWorkArea const * GuiView::currentWorkArea() const } -void GuiView::setCurrentWorkArea(GuiWorkArea * work_area) +void GuiView::setCurrentWorkArea(GuiWorkArea * wa) { - BOOST_ASSERT(work_area); + BOOST_ASSERT(wa); // Changing work area can result from opening a file so // update the toc in any case. updateToc(); - GuiWorkArea * wa = static_cast(work_area); d.current_work_area_ = wa; for (int i = 0; i != d.splitter_->count(); ++i) { if (d.tabWorkArea(i)->setCurrentWorkArea(wa)) @@ -722,11 +721,10 @@ void GuiView::setCurrentWorkArea(GuiWorkArea * work_area) } -void GuiView::removeWorkArea(GuiWorkArea * work_area) +void GuiView::removeWorkArea(GuiWorkArea * wa) { - BOOST_ASSERT(work_area); - GuiWorkArea * gwa = static_cast(work_area); - if (gwa == d.current_work_area_) { + BOOST_ASSERT(wa); + if (wa == d.current_work_area_) { disconnectBuffer(); disconnectBufferView(); hideBufferDependent(); @@ -739,7 +737,7 @@ void GuiView::removeWorkArea(GuiWorkArea * work_area) for (int i = 0; i != d.splitter_->count(); ++i) { TabWorkArea * twa = d.tabWorkArea(i); - if (!twa->removeWorkArea(gwa)) + if (!twa->removeWorkArea(wa)) // Not found in this tab group. continue; -- 2.39.5