aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/maps
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/maps
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/maps')
-rw-r--r--main/src/cgeo/geocaching/maps/CGeoMap.java2
-rw-r--r--main/src/cgeo/geocaching/maps/OtherCachersOverlayItem.java2
-rw-r--r--main/src/cgeo/geocaching/maps/PositionOverlay.java2
3 files changed, 3 insertions, 3 deletions
diff --git a/main/src/cgeo/geocaching/maps/CGeoMap.java b/main/src/cgeo/geocaching/maps/CGeoMap.java
index 4b01540..e81760a 100644
--- a/main/src/cgeo/geocaching/maps/CGeoMap.java
+++ b/main/src/cgeo/geocaching/maps/CGeoMap.java
@@ -1329,7 +1329,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
List<OtherCachersOverlayItemImpl> items = new ArrayList<OtherCachersOverlayItemImpl>();
int counter = 0;
- OtherCachersOverlayItemImpl item = null;
+ OtherCachersOverlayItemImpl item;
for (Go4CacheUser userOne : users) {
if (userOne.getCoords() == null) {
diff --git a/main/src/cgeo/geocaching/maps/OtherCachersOverlayItem.java b/main/src/cgeo/geocaching/maps/OtherCachersOverlayItem.java
index d71bbcf..9844e83 100644
--- a/main/src/cgeo/geocaching/maps/OtherCachersOverlayItem.java
+++ b/main/src/cgeo/geocaching/maps/OtherCachersOverlayItem.java
@@ -16,7 +16,7 @@ public class OtherCachersOverlayItem {
}
public Drawable getMarker() {
- Drawable marker = null;
+ Drawable marker;
if (user != null && user.getDate() != null && user.getDate().getTime() >= (System.currentTimeMillis() - (20 * 60 * 1000))) {
marker = context.getResources().getDrawable(R.drawable.user_location_active);
diff --git a/main/src/cgeo/geocaching/maps/PositionOverlay.java b/main/src/cgeo/geocaching/maps/PositionOverlay.java
index ba39cd2..9099498 100644
--- a/main/src/cgeo/geocaching/maps/PositionOverlay.java
+++ b/main/src/cgeo/geocaching/maps/PositionOverlay.java
@@ -150,7 +150,7 @@ public class PositionOverlay implements GeneralOverlay {
if (Settings.isMapTrail()) {
int size = history.size();
if (size > 1) {
- int alpha = 0;
+ int alpha;
int alphaCnt = size - 201;
if (alphaCnt < 1) {
alphaCnt = 1;