From 7abebda5c89c2e2d885a64a94c8172ff1662a76b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Perrin?= Date: Sun, 1 Dec 2019 22:19:52 +0000 Subject: [PATCH] wip viewfinder --- src/tim/prune/function/srtm/SrtmTile.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/tim/prune/function/srtm/SrtmTile.java b/src/tim/prune/function/srtm/SrtmTile.java index 62e2ba1..69e8537 100644 --- a/src/tim/prune/function/srtm/SrtmTile.java +++ b/src/tim/prune/function/srtm/SrtmTile.java @@ -41,9 +41,15 @@ public class SrtmTile * @param inOther other tile object * @return true if both represent same tile */ - public boolean equals(SrtmTile inOther) + public boolean equals(Object inOther) { - return (_latitude == inOther._latitude) && (_longitude == inOther._longitude); + if (! (inOther instanceof SrtmTile)) + { + return false; + } + SrtmTile otherTile = (SrtmTile) inOther; + return (_latitude == otherTile._latitude) && + (_longitude == otherTile._longitude); } public int hashCode() -- 2.43.0