Ignore:
Timestamp:
2016-03-13T00:38:12+01:00 (8 years ago)
Author:
Don-vip
Message:

sonar - code simplification

File:
1 edited

Legend:

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

    r9372 r9976  
    153153     */
    154154    public boolean bounds(BBox b) {
    155         if (!(xmin <= b.xmin) ||
    156                 !(xmax >= b.xmax) ||
    157                 !(ymin <= b.ymin) ||
    158                 !(ymax >= b.ymax))
    159             return false;
    160         return true;
     155        return xmin <= b.xmin && xmax >= b.xmax
     156            && ymin <= b.ymin && ymax >= b.ymax;
    161157    }
    162158
     
    167163     */
    168164    public boolean bounds(LatLon c) {
    169         if ((xmin <= c.lon()) &&
    170                 (xmax >= c.lon()) &&
    171                 (ymin <= c.lat()) &&
    172                 (ymax >= c.lat()))
    173             return true;
    174         return false;
     165        return xmin <= c.lon() && xmax >= c.lon()
     166            && ymin <= c.lat() && ymax >= c.lat();
    175167    }
    176168
Note: See TracChangeset for help on using the changeset viewer.