Ignore:
Timestamp:
2010-08-21T14:59:31+02:00 (14 years ago)
Author:
bastiK
Message:

suppress some trivial warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java

    r3157 r3453  
    575575        return true;
    576576    }
    577     // If anyone has suggestions for how to fix
    578     // this properly, I'm listening :)
    579     @SuppressWarnings("unchecked")
    580     private T convert(Object raw)
    581     {
    582         return (T)raw;
    583     }
    584577    public boolean remove(Object o) {
    585         return this.remove(convert(o));
    586     }
    587     public boolean remove(T o) {
     578        @SuppressWarnings("unchecked") T t = (T) o;
    588579        synchronized (split_lock) {
    589580            search_cache = null; // Search cache might point to one of removed buckets
    590             QBLevel bucket = root.findBucket(o.getBBox());
    591             if (bucket.remove_content(o)) {
     581            QBLevel bucket = root.findBucket(t.getBBox());
     582            if (bucket.remove_content(t)) {
    592583                size--;
    593584                return true;
     
    597588    }
    598589    public boolean contains(Object o) {
    599         QBLevel bucket = root.findBucket(convert(o).getBBox());
    600         return bucket != null && bucket.content != null && bucket.content.contains(o);
     590        @SuppressWarnings("unchecked") T t = (T) o;
     591        QBLevel bucket = root.findBucket(t.getBBox());
     592        return bucket != null && bucket.content != null && bucket.content.contains(t);
    601593    }
    602594
Note: See TracChangeset for help on using the changeset viewer.