aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/ui
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2012-04-28 11:52:02 +0200
committerSamuel Tardieu <sam@rfc1149.net>2012-04-28 11:52:36 +0200
commit6050f7ce2d80ecdfc0d890e86ebacbe474bbbc1c (patch)
tree85c80fe7ce069335035fb6f5b3f327c81e490e04 /main/src/cgeo/geocaching/ui
parent710c3128af94d4b5c2f0ef755810fab5b3c3bcd5 (diff)
downloadcgeo-6050f7ce2d80ecdfc0d890e86ebacbe474bbbc1c.zip
cgeo-6050f7ce2d80ecdfc0d890e86ebacbe474bbbc1c.tar.gz
cgeo-6050f7ce2d80ecdfc0d890e86ebacbe474bbbc1c.tar.bz2
Refactoring: remove redundant initializers
The initial values were never used as the variables are set in any case before being used.
Diffstat (limited to 'main/src/cgeo/geocaching/ui')
-rw-r--r--main/src/cgeo/geocaching/ui/CacheListAdapter.java2
-rw-r--r--main/src/cgeo/geocaching/ui/CompassMiniView.java8
-rw-r--r--main/src/cgeo/geocaching/ui/CompassView.java8
-rw-r--r--main/src/cgeo/geocaching/ui/GPXListAdapter.java2
4 files changed, 10 insertions, 10 deletions
diff --git a/main/src/cgeo/geocaching/ui/CacheListAdapter.java b/main/src/cgeo/geocaching/ui/CacheListAdapter.java
index 1cd05f0..bda53d7 100644
--- a/main/src/cgeo/geocaching/ui/CacheListAdapter.java
+++ b/main/src/cgeo/geocaching/ui/CacheListAdapter.java
@@ -470,7 +470,7 @@ public class CacheListAdapter extends ArrayAdapter<cgCache> {
holder.inventory.removeAllViews();
}
- ImageView tbIcon = null;
+ ImageView tbIcon;
if (cache.getInventoryItems() > 0) {
tbIcon = (ImageView) inflater.inflate(R.layout.trackable_icon, null);
tbIcon.setImageResource(R.drawable.trackable_all);
diff --git a/main/src/cgeo/geocaching/ui/CompassMiniView.java b/main/src/cgeo/geocaching/ui/CompassMiniView.java
index 1fa4cfb..b51b7a2 100644
--- a/main/src/cgeo/geocaching/ui/CompassMiniView.java
+++ b/main/src/cgeo/geocaching/ui/CompassMiniView.java
@@ -111,8 +111,8 @@ public class CompassMiniView extends View {
// compass margins
canvas.setDrawFilter(setfil);
- int marginLeft = 0;
- int marginTop = 0;
+ int marginLeft;
+ int marginTop;
int compassArrowWidth = compassArrow.getWidth();
int compassArrowHeight = compassArrow.getWidth();
@@ -136,7 +136,7 @@ public class CompassMiniView extends View {
}
private int measureWidth(int measureSpec) {
- int result = 0;
+ int result;
int specMode = MeasureSpec.getMode(measureSpec);
int specSize = MeasureSpec.getSize(measureSpec);
@@ -154,7 +154,7 @@ public class CompassMiniView extends View {
}
private int measureHeight(int measureSpec) {
- int result = 0;
+ int result;
int specMode = MeasureSpec.getMode(measureSpec);
int specSize = MeasureSpec.getSize(measureSpec);
diff --git a/main/src/cgeo/geocaching/ui/CompassView.java b/main/src/cgeo/geocaching/ui/CompassView.java
index f9fb569..8a295c3 100644
--- a/main/src/cgeo/geocaching/ui/CompassView.java
+++ b/main/src/cgeo/geocaching/ui/CompassView.java
@@ -209,8 +209,8 @@ public class CompassView extends View {
int canvasCenterX = (compassRoseWidth / 2) + ((getWidth() - compassRoseWidth) / 2);
int canvasCenterY = (compassRoseHeight / 2) + ((getHeight() - compassRoseHeight) / 2);
- int marginLeftTemp = 0;
- int marginTopTemp = 0;
+ int marginLeftTemp;
+ int marginTopTemp;
super.onDraw(canvas);
@@ -251,7 +251,7 @@ public class CompassView extends View {
}
private int measureWidth(int measureSpec) {
- int result = 0;
+ int result;
int specMode = MeasureSpec.getMode(measureSpec);
int specSize = MeasureSpec.getSize(measureSpec);
@@ -269,7 +269,7 @@ public class CompassView extends View {
}
private int measureHeight(int measureSpec) {
- int result = 0;
+ int result;
int specMode = MeasureSpec.getMode(measureSpec);
int specSize = MeasureSpec.getSize(measureSpec);
diff --git a/main/src/cgeo/geocaching/ui/GPXListAdapter.java b/main/src/cgeo/geocaching/ui/GPXListAdapter.java
index c62fa8c..76dc10e 100644
--- a/main/src/cgeo/geocaching/ui/GPXListAdapter.java
+++ b/main/src/cgeo/geocaching/ui/GPXListAdapter.java
@@ -39,7 +39,7 @@ public class GPXListAdapter extends ArrayAdapter<File> {
final File file = getItem(position);
View v = rowView;
- GPXListView holder = null;
+ GPXListView holder;
if (v == null) {
v = inflater.inflate(R.layout.gpx_item, null);