From 06681a3db74aa72b0d3a12b9d79bcece65998ca5 Mon Sep 17 00:00:00 2001 From: Mohamed Ezzat Date: Mon, 18 Apr 2016 13:40:26 +0200 Subject: [PATCH] squid:S1854 - Dead stores should be removed (#253) --- .../pager/vertical/VerticalViewPagerImpl.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/vertical/VerticalViewPagerImpl.java b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/vertical/VerticalViewPagerImpl.java index baded3360e..9f407b8e89 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/vertical/VerticalViewPagerImpl.java +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/vertical/VerticalViewPagerImpl.java @@ -860,7 +860,7 @@ public class VerticalViewPagerImpl extends ViewGroup { final float distance = halfHeight + halfHeight * distanceInfluenceForSnapDuration(distanceRatio); - int duration = 0; + int duration; velocity = Math.abs(velocity); if (velocity > 0) { duration = 4 * Math.round(1000 * Math.abs(distance / velocity)); @@ -1017,7 +1017,7 @@ public class VerticalViewPagerImpl extends ViewGroup { } // Locate the currently focused item or add it if needed. - int curIndex = -1; + int curIndex; ItemInfo curItem = null; for (curIndex = 0; curIndex < mItems.size(); curIndex++) { final ItemInfo ii = mItems.get(curIndex); @@ -1177,7 +1177,7 @@ public class VerticalViewPagerImpl extends ViewGroup { // Base offsets off of oldCurInfo. if (oldCurPosition < curItem.position) { int itemIndex = 0; - ItemInfo ii = null; + ItemInfo ii; float offset = oldCurInfo.offset + oldCurInfo.heightFactor + marginOffset; for (int pos = oldCurPosition + 1; pos <= curItem.position && itemIndex < mItems.size(); pos++) { @@ -1197,7 +1197,7 @@ public class VerticalViewPagerImpl extends ViewGroup { } } else if (oldCurPosition > curItem.position) { int itemIndex = mItems.size() - 1; - ItemInfo ii = null; + ItemInfo ii; float offset = oldCurInfo.offset; for (int pos = oldCurPosition - 1; pos >= curItem.position && itemIndex >= 0; pos--) { @@ -1561,8 +1561,8 @@ public class VerticalViewPagerImpl extends ViewGroup { final View child = getChildAt(i); if (child.getVisibility() != GONE) { final LayoutParams lp = (LayoutParams) child.getLayoutParams(); - int childLeft = 0; - int childTop = 0; + int childLeft; + int childTop; if (lp.isDecor) { final int hgrav = lp.gravity & Gravity.HORIZONTAL_GRAVITY_MASK; final int vgrav = lp.gravity & Gravity.VERTICAL_GRAVITY_MASK; @@ -1731,7 +1731,7 @@ public class VerticalViewPagerImpl extends ViewGroup { if (!lp.isDecor) continue; final int vgrav = lp.gravity & Gravity.VERTICAL_GRAVITY_MASK; - int childTop = 0; + int childTop; switch (vgrav) { default: childTop = paddingTop;