diff options
author | Samuel Tardieu <sam@rfc1149.net> | 2012-04-22 00:14:13 +0200 |
---|---|---|
committer | Samuel Tardieu <sam@rfc1149.net> | 2012-04-22 00:44:13 +0200 |
commit | 406f669bee7402a7b1965e38848a9ed9994aae5c (patch) | |
tree | 90aa36b11ed2bd145486466dd15abd2bdd0d9f9f /main/src/cgeo/geocaching/cgCache.java | |
parent | b2a4101f46a1b21fbf6e5396f59208c0b80dbff6 (diff) | |
download | cgeo-406f669bee7402a7b1965e38848a9ed9994aae5c.zip cgeo-406f669bee7402a7b1965e38848a9ed9994aae5c.tar.gz cgeo-406f669bee7402a7b1965e38848a9ed9994aae5c.tar.bz2 |
Refactoring: simplify redundant if statement
Diffstat (limited to 'main/src/cgeo/geocaching/cgCache.java')
-rw-r--r-- | main/src/cgeo/geocaching/cgCache.java | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/main/src/cgeo/geocaching/cgCache.java b/main/src/cgeo/geocaching/cgCache.java index 9be1386..33ada73 100644 --- a/main/src/cgeo/geocaching/cgCache.java +++ b/main/src/cgeo/geocaching/cgCache.java @@ -369,10 +369,7 @@ public class cgCache implements ICache, IWaypoint { cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); - if (hidden.compareTo(cal.getTime()) < 0) { - return false; - } - return true; + return hidden.compareTo(cal.getTime()) >= 0; } /** @@ -1213,10 +1210,7 @@ public class cgCache implements ICache, IWaypoint { if (!hasWaypoints()) { return false; } - if (index < 0 || index >= waypoints.size()) { - return false; - } - return true; + return index >= 0 && index < waypoints.size(); } /** |