summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-06-24 18:57:11 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-06-24 18:57:11 +0200
commitd56dc64795dcd913d5fa663275bf34b75a0c82e6 (patch)
tree0a2fedbded89e2ec88df3832c685a14832109772
parent4e3ff19b33c84557fd20e68960499933b4e52638 (diff)
clang-analyzer-deadcode.DeadStores
Change-Id: I1660e3ed5eb5fac276f3715fe1ffa2308408f1b5
-rw-r--r--svtools/source/control/tabbar.cxx11
1 files changed, 3 insertions, 8 deletions
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 9d36f561f318..64abad5c61d9 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)
{