aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/SearchResult.java
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2012-03-01 08:24:50 +0100
committerBananeweizen <bananeweizen@gmx.de>2012-03-01 08:25:59 +0100
commit0816152835818260387d6c21a8c912ed150b31be (patch)
tree323c7d72fda9742f767f19f52724abca7b98508f /main/src/cgeo/geocaching/SearchResult.java
parent3fde9652fdc7c7285e4aa00a447df2ae4359b8d9 (diff)
downloadcgeo-0816152835818260387d6c21a8c912ed150b31be.zip
cgeo-0816152835818260387d6c21a8c912ed150b31be.tar.gz
cgeo-0816152835818260387d6c21a8c912ed150b31be.tar.bz2
refactoring: don't load caches in loops
Diffstat (limited to 'main/src/cgeo/geocaching/SearchResult.java')
-rw-r--r--main/src/cgeo/geocaching/SearchResult.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/SearchResult.java b/main/src/cgeo/geocaching/SearchResult.java
index 74602d4..fba946a 100644
--- a/main/src/cgeo/geocaching/SearchResult.java
+++ b/main/src/cgeo/geocaching/SearchResult.java
@@ -145,8 +145,8 @@ public class SearchResult implements Parcelable {
SearchResult result = new SearchResult(this);
result.geocodes.clear();
- for (final String geocode : geocodes) {
- cgCache cache = cgeoapplication.getInstance().loadCache(geocode, LoadFlags.LOAD_CACHE_OR_DB);
+ final Set<cgCache> caches = cgeoapplication.getInstance().loadCaches(geocodes, LoadFlags.LOAD_CACHE_OR_DB);
+ for (cgCache cache : caches) {
// Is there any reason to exclude the cache from the list?
final boolean excludeCache = (excludeDisabled && cache.isDisabled()) ||
(excludeMine && (cache.isOwn() || cache.isFound())) ||