From 86a9147ebb3f2204fe79554d494a1e2bf172b8e2 Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Tue, 4 Sep 2012 00:39:03 +0200 Subject: Refactoring: remove unnecessary boxing/unboxing --- main/src/cgeo/geocaching/maps/MapProviderFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/src/cgeo/geocaching/maps/MapProviderFactory.java b/main/src/cgeo/geocaching/maps/MapProviderFactory.java index 7c0c8e5..778c921 100644 --- a/main/src/cgeo/geocaching/maps/MapProviderFactory.java +++ b/main/src/cgeo/geocaching/maps/MapProviderFactory.java @@ -93,7 +93,7 @@ public class MapProviderFactory { public static void addMapviewMenuItems(Menu parentMenu, int groupId, int currentSource) { for (Integer key : mapSources.keySet()) { - parentMenu.add(groupId, key, 0, mapSources.get(key).getName()).setCheckable(true).setChecked(key.intValue() == currentSource); + parentMenu.add(groupId, key, 0, mapSources.get(key).getName()).setCheckable(true).setChecked(key == currentSource); } } @@ -102,6 +102,6 @@ public class MapProviderFactory { } public static MapSource getMapSource(int sourceId) { - return mapSources.get(Integer.valueOf(sourceId)); + return mapSources.get(sourceId); } } -- cgit v1.1