aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/Waypoint.java
diff options
context:
space:
mode:
authorMarco Jacob <mjacob@union06.de>2013-03-07 21:13:08 +0100
committerMarco Jacob <mjacob@union06.de>2013-03-07 21:13:08 +0100
commita47a2abd6a1874522dc84f7ca8ccf67215dd5f3c (patch)
tree8992d3126a5791573264fcb46faa626ceb2617eb /main/src/cgeo/geocaching/Waypoint.java
parent8cd43a01a6c84ee17e5d29b0e3b8a1acfdf5312e (diff)
downloadcgeo-a47a2abd6a1874522dc84f7ca8ccf67215dd5f3c.zip
cgeo-a47a2abd6a1874522dc84f7ca8ccf67215dd5f3c.tar.gz
cgeo-a47a2abd6a1874522dc84f7ca8ccf67215dd5f3c.tar.bz2
fixes #2507 - Waypoints only stored if not existing
Diffstat (limited to 'main/src/cgeo/geocaching/Waypoint.java')
-rw-r--r--main/src/cgeo/geocaching/Waypoint.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/Waypoint.java b/main/src/cgeo/geocaching/Waypoint.java
index 4b014a6..53160e5 100644
--- a/main/src/cgeo/geocaching/Waypoint.java
+++ b/main/src/cgeo/geocaching/Waypoint.java
@@ -269,4 +269,13 @@ public class Waypoint implements IWaypoint, Comparable<Waypoint> {
public boolean isVisited() {
return visited;
}
+
+ public int calculateStaticMapsHashcode() {
+ long hash = 0;
+ if (coords != null) {
+ hash = coords.hashCode();
+ }
+ hash = hash ^ waypointType.markerId;
+ return (int) hash;
+ }
}