aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/DataStore.java
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2014-10-28 20:43:59 +0100
committerSamuel Tardieu <sam@rfc1149.net>2014-10-28 20:45:51 +0100
commitd005b2fab5f4b8c10361b136762f5f43db378688 (patch)
treebfe9da6c69fb95989f4250b97717731719980fe9 /main/src/cgeo/geocaching/DataStore.java
parentc48367feb633669c061da16778ad8ce0582f475d (diff)
downloadcgeo-d005b2fab5f4b8c10361b136762f5f43db378688.zip
cgeo-d005b2fab5f4b8c10361b136762f5f43db378688.tar.gz
cgeo-d005b2fab5f4b8c10361b136762f5f43db378688.tar.bz2
Add a Geocache.getGeocodes helper for a common pattern
Diffstat (limited to 'main/src/cgeo/geocaching/DataStore.java')
-rw-r--r--main/src/cgeo/geocaching/DataStore.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/main/src/cgeo/geocaching/DataStore.java b/main/src/cgeo/geocaching/DataStore.java
index c5db7d4..1aba760 100644
--- a/main/src/cgeo/geocaching/DataStore.java
+++ b/main/src/cgeo/geocaching/DataStore.java
@@ -2492,13 +2492,11 @@ public class DataStore {
init();
- final Set<String> geocodes = new HashSet<>(caches.size());
for (final Geocache cache : caches) {
- geocodes.add(cache.getGeocode());
cache.setLogOffline(false);
}
- database.execSQL(String.format("DELETE FROM %s where %s", dbTableLogsOffline, whereGeocodeIn(geocodes)));
+ database.execSQL(String.format("DELETE FROM %s where %s", dbTableLogsOffline, whereGeocodeIn(Geocache.getGeocodes(caches))));
}
public static boolean hasLogOffline(final String geocode) {