[Libreoffice-commits] core.git: svtools/source
Stephan Bergmann
sbergman at redhat.com
Fri Jun 24 16:57:40 UTC 2016
svtools/source/control/tabbar.cxx | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
New commits:
commit d56dc64795dcd913d5fa663275bf34b75a0c82e6
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 24 18:57:11 2016 +0200
clang-analyzer-deadcode.DeadStores
Change-Id: I1660e3ed5eb5fac276f3715fe1ffa2308408f1b5
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 9d36f56..64abad5 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -976,7 +976,6 @@ void TabBar::MouseButtonDown(const MouseEvent& rMEvt)
return;
}
- ImplTabBarItem* pItem;
sal_uInt16 nSelId = GetPageId(rMEvt.GetPosPixel());
if (!rMEvt.IsLeft())
@@ -984,9 +983,6 @@ void TabBar::MouseButtonDown(const MouseEvent& rMEvt)
Window::MouseButtonDown(rMEvt);
if (nSelId > 0 && nSelId != mnCurPageId)
{
- sal_uInt16 nPos = GetPagePos( nSelId );
- pItem = mpImpl->mpItemList[nPos];
-
if (ImplDeactivatePage())
{
SetCurPageId(nSelId);
@@ -1010,7 +1006,6 @@ void TabBar::MouseButtonDown(const MouseEvent& rMEvt)
if (nSelId)
{
sal_uInt16 nPos = GetPagePos(nSelId);
- pItem = mpImpl->mpItemList[nPos];
bool bSelectTab = false;
@@ -1036,7 +1031,7 @@ void TabBar::MouseButtonDown(const MouseEvent& rMEvt)
n = 0;
while (n < nCurPos)
{
- pItem = mpImpl->mpItemList[n];
+ auto pItem = mpImpl->mpItemList[n];
if (n < nPos)
bSelect = false;
else
@@ -1062,7 +1057,7 @@ void TabBar::MouseButtonDown(const MouseEvent& rMEvt)
n = nCurPos;
while (n < nCount)
{
- pItem = mpImpl->mpItemList[n];
+ auto pItem = mpImpl->mpItemList[n];
if (n <= nPos)
bSelect = true;
@@ -1118,7 +1113,7 @@ void TabBar::MouseButtonDown(const MouseEvent& rMEvt)
if (nSelId != mnCurPageId)
{
sal_uInt16 nPos = GetPagePos(nSelId);
- pItem = mpImpl->mpItemList[nPos];
+ auto pItem = mpImpl->mpItemList[nPos];
if (!pItem->mbSelect)
{
More information about the Libreoffice-commits
mailing list