diff options
| author | blafoo <github@blafoo.de> | 2012-02-22 22:09:36 +0100 |
|---|---|---|
| committer | blafoo <github@blafoo.de> | 2012-02-23 23:31:34 +0100 |
| commit | 196dd6ab57977f778459ec4bb2a873b6d7734f6f (patch) | |
| tree | 9b8629cbfb76e05c9a8e8ec825558f0d82ce4db6 /main/src/cgeo/geocaching/connector/gc/UTFGridPosition.java | |
| parent | 7ac4206e7c0308d2127845d7bf9214e73b845295 (diff) | |
| download | cgeo-196dd6ab57977f778459ec4bb2a873b6d7734f6f.zip cgeo-196dd6ab57977f778459ec4bb2a873b6d7734f6f.tar.gz cgeo-196dd6ab57977f778459ec4bb2a873b6d7734f6f.tar.bz2 | |
Live Map optimizations
Diffstat (limited to 'main/src/cgeo/geocaching/connector/gc/UTFGridPosition.java')
| -rw-r--r-- | main/src/cgeo/geocaching/connector/gc/UTFGridPosition.java | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/main/src/cgeo/geocaching/connector/gc/UTFGridPosition.java b/main/src/cgeo/geocaching/connector/gc/UTFGridPosition.java index 9d875c5..9121dad 100644 --- a/main/src/cgeo/geocaching/connector/gc/UTFGridPosition.java +++ b/main/src/cgeo/geocaching/connector/gc/UTFGridPosition.java @@ -1,8 +1,5 @@ package cgeo.geocaching.connector.gc; -import cgeo.geocaching.Settings; - -import android.util.Log; /** * Representation of a position inside an UTFGrid @@ -16,14 +13,9 @@ public final class UTFGridPosition { public final int y; UTFGridPosition(final int x, final int y) { - if (x > UTFGrid.GRID_MAXX) { - Log.e(Settings.tag, "x outside grid"); - throw new IllegalArgumentException("x outside grid"); - } - if (y > UTFGrid.GRID_MAXY) { - Log.e(Settings.tag, "y outside grid"); - throw new IllegalArgumentException("y outside grid"); - } + assert x >= 0 && x <= UTFGrid.GRID_MAXX : "x outside bounds"; + assert y >= 0 && y <= UTFGrid.GRID_MAXY : "y outside bounds"; + this.x = x; this.y = y; } |
