aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2012-05-06 15:53:36 +0200
committerSamuel Tardieu <sam@rfc1149.net>2012-05-06 15:53:36 +0200
commit6d999226b74315e9d8cc72ec6c4b4e96869f8aae (patch)
treed660336e850f559fadc6313c7b2f30ba2c21b0ea /main/src/cgeo/geocaching
parent188242b1ba91cdeaad0bd44a8354b9adc48fbe10 (diff)
downloadcgeo-6d999226b74315e9d8cc72ec6c4b4e96869f8aae.zip
cgeo-6d999226b74315e9d8cc72ec6c4b4e96869f8aae.tar.gz
cgeo-6d999226b74315e9d8cc72ec6c4b4e96869f8aae.tar.bz2
Refactoring: remove redundant local variables
Redundant local variables are assigned once and only used to return the value. Returning the value directly is as readable and more concise.
Diffstat (limited to 'main/src/cgeo/geocaching')
-rw-r--r--main/src/cgeo/geocaching/maps/google/GoogleMapItemFactory.java6
-rw-r--r--main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapItemFactory.java6
-rw-r--r--main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapItemFactory024.java6
3 files changed, 6 insertions, 12 deletions
diff --git a/main/src/cgeo/geocaching/maps/google/GoogleMapItemFactory.java b/main/src/cgeo/geocaching/maps/google/GoogleMapItemFactory.java
index 0e18dce..1a10023 100644
--- a/main/src/cgeo/geocaching/maps/google/GoogleMapItemFactory.java
+++ b/main/src/cgeo/geocaching/maps/google/GoogleMapItemFactory.java
@@ -20,13 +20,11 @@ public class GoogleMapItemFactory implements MapItemFactory {
@Override
public CachesOverlayItemImpl getCachesOverlayItem(final IWaypoint coordinate, final CacheType type) {
- GoogleCacheOverlayItem baseItem = new GoogleCacheOverlayItem(coordinate, type);
- return baseItem;
+ return new GoogleCacheOverlayItem(coordinate, type);
}
@Override
public OtherCachersOverlayItemImpl getOtherCachersOverlayItemBase(Context context, Go4CacheUser userOne) {
- GoogleOtherCachersOverlayItem baseItem = new GoogleOtherCachersOverlayItem(context, userOne);
- return baseItem;
+ return new GoogleOtherCachersOverlayItem(context, userOne);
}
}
diff --git a/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapItemFactory.java b/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapItemFactory.java
index 5e86f81..0df7894 100644
--- a/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapItemFactory.java
+++ b/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapItemFactory.java
@@ -20,14 +20,12 @@ public class MapsforgeMapItemFactory implements MapItemFactory {
@Override
public CachesOverlayItemImpl getCachesOverlayItem(final IWaypoint coordinate, final CacheType type) {
- MapsforgeCacheOverlayItem baseItem = new MapsforgeCacheOverlayItem(coordinate, type);
- return baseItem;
+ return new MapsforgeCacheOverlayItem(coordinate, type);
}
@Override
public OtherCachersOverlayItemImpl getOtherCachersOverlayItemBase(Context context, Go4CacheUser userOne) {
- MapsforgeOtherCachersOverlayItem baseItem = new MapsforgeOtherCachersOverlayItem(context, userOne);
- return baseItem;
+ return new MapsforgeOtherCachersOverlayItem(context, userOne);
}
}
diff --git a/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapItemFactory024.java b/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapItemFactory024.java
index 27cadd8..863cbca 100644
--- a/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapItemFactory024.java
+++ b/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapItemFactory024.java
@@ -20,14 +20,12 @@ public class MapsforgeMapItemFactory024 implements MapItemFactory {
@Override
public CachesOverlayItemImpl getCachesOverlayItem(final IWaypoint coordinate, final CacheType type) {
- MapsforgeCacheOverlayItem baseItem = new MapsforgeCacheOverlayItem(coordinate, type);
- return baseItem;
+ return new MapsforgeCacheOverlayItem(coordinate, type);
}
@Override
public OtherCachersOverlayItemImpl getOtherCachersOverlayItemBase(Context context, Go4CacheUser userOne) {
- MapsforgeOtherCachersOverlayItem baseItem = new MapsforgeOtherCachersOverlayItem(context, userOne);
- return baseItem;
+ return new MapsforgeOtherCachersOverlayItem(context, userOne);
}
}