mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-27 16:26:29 +03:00
squid:S1854 - Dead stores should be removed (#253)
This commit is contained in:
parent
55de2b7d97
commit
06681a3db7
1 changed files with 7 additions and 7 deletions
|
@ -860,7 +860,7 @@ public class VerticalViewPagerImpl extends ViewGroup {
|
||||||
final float distance = halfHeight + halfHeight *
|
final float distance = halfHeight + halfHeight *
|
||||||
distanceInfluenceForSnapDuration(distanceRatio);
|
distanceInfluenceForSnapDuration(distanceRatio);
|
||||||
|
|
||||||
int duration = 0;
|
int duration;
|
||||||
velocity = Math.abs(velocity);
|
velocity = Math.abs(velocity);
|
||||||
if (velocity > 0) {
|
if (velocity > 0) {
|
||||||
duration = 4 * Math.round(1000 * Math.abs(distance / velocity));
|
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.
|
// Locate the currently focused item or add it if needed.
|
||||||
int curIndex = -1;
|
int curIndex;
|
||||||
ItemInfo curItem = null;
|
ItemInfo curItem = null;
|
||||||
for (curIndex = 0; curIndex < mItems.size(); curIndex++) {
|
for (curIndex = 0; curIndex < mItems.size(); curIndex++) {
|
||||||
final ItemInfo ii = mItems.get(curIndex);
|
final ItemInfo ii = mItems.get(curIndex);
|
||||||
|
@ -1177,7 +1177,7 @@ public class VerticalViewPagerImpl extends ViewGroup {
|
||||||
// Base offsets off of oldCurInfo.
|
// Base offsets off of oldCurInfo.
|
||||||
if (oldCurPosition < curItem.position) {
|
if (oldCurPosition < curItem.position) {
|
||||||
int itemIndex = 0;
|
int itemIndex = 0;
|
||||||
ItemInfo ii = null;
|
ItemInfo ii;
|
||||||
float offset = oldCurInfo.offset + oldCurInfo.heightFactor + marginOffset;
|
float offset = oldCurInfo.offset + oldCurInfo.heightFactor + marginOffset;
|
||||||
for (int pos = oldCurPosition + 1;
|
for (int pos = oldCurPosition + 1;
|
||||||
pos <= curItem.position && itemIndex < mItems.size(); pos++) {
|
pos <= curItem.position && itemIndex < mItems.size(); pos++) {
|
||||||
|
@ -1197,7 +1197,7 @@ public class VerticalViewPagerImpl extends ViewGroup {
|
||||||
}
|
}
|
||||||
} else if (oldCurPosition > curItem.position) {
|
} else if (oldCurPosition > curItem.position) {
|
||||||
int itemIndex = mItems.size() - 1;
|
int itemIndex = mItems.size() - 1;
|
||||||
ItemInfo ii = null;
|
ItemInfo ii;
|
||||||
float offset = oldCurInfo.offset;
|
float offset = oldCurInfo.offset;
|
||||||
for (int pos = oldCurPosition - 1;
|
for (int pos = oldCurPosition - 1;
|
||||||
pos >= curItem.position && itemIndex >= 0; pos--) {
|
pos >= curItem.position && itemIndex >= 0; pos--) {
|
||||||
|
@ -1561,8 +1561,8 @@ public class VerticalViewPagerImpl extends ViewGroup {
|
||||||
final View child = getChildAt(i);
|
final View child = getChildAt(i);
|
||||||
if (child.getVisibility() != GONE) {
|
if (child.getVisibility() != GONE) {
|
||||||
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
|
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
|
||||||
int childLeft = 0;
|
int childLeft;
|
||||||
int childTop = 0;
|
int childTop;
|
||||||
if (lp.isDecor) {
|
if (lp.isDecor) {
|
||||||
final int hgrav = lp.gravity & Gravity.HORIZONTAL_GRAVITY_MASK;
|
final int hgrav = lp.gravity & Gravity.HORIZONTAL_GRAVITY_MASK;
|
||||||
final int vgrav = lp.gravity & Gravity.VERTICAL_GRAVITY_MASK;
|
final int vgrav = lp.gravity & Gravity.VERTICAL_GRAVITY_MASK;
|
||||||
|
@ -1731,7 +1731,7 @@ public class VerticalViewPagerImpl extends ViewGroup {
|
||||||
if (!lp.isDecor) continue;
|
if (!lp.isDecor) continue;
|
||||||
|
|
||||||
final int vgrav = lp.gravity & Gravity.VERTICAL_GRAVITY_MASK;
|
final int vgrav = lp.gravity & Gravity.VERTICAL_GRAVITY_MASK;
|
||||||
int childTop = 0;
|
int childTop;
|
||||||
switch (vgrav) {
|
switch (vgrav) {
|
||||||
default:
|
default:
|
||||||
childTop = paddingTop;
|
childTop = paddingTop;
|
||||||
|
|
Loading…
Reference in a new issue