Ignore:
Timestamp:
2017-04-13T01:08:58+02:00 (7 years ago)
Author:
Don-vip
Message:

sonar - squid:S1126 - Return of boolean expressions should not be wrapped into an "if-then-else" statement

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java

    r11870 r11893  
    14541454        if (bounds.isEmpty()) return false;
    14551455        MapViewPoint p = mapState.getPointFor(new EastNorth(bounds.getX(), bounds.getY()));
    1456         if (p.getInViewX() > mapState.getViewWidth()) return false;
    1457         if (p.getInViewY() < 0) return false;
     1456        if (p.getInViewY() < 0 || p.getInViewX() > mapState.getViewWidth()) return false;
    14581457        p = mapState.getPointFor(new EastNorth(bounds.getX() + bounds.getWidth(), bounds.getY() + bounds.getHeight()));
    1459         if (p.getInViewX() < 0) return false;
    1460         if (p.getInViewY() > mapState.getViewHeight()) return false;
    1461         return true;
    1462     }
    1463 
     1458        return p.getInViewX() >= 0 && p.getInViewY() <= mapState.getViewHeight();
     1459    }
     1460
     1461    /**
     1462     * Determines if the paint visitor shall render OSM objects such that they look inactive.
     1463     * @return {@code true} if the paint visitor shall render OSM objects such that they look inactive
     1464     */
    14641465    public boolean isInactiveMode() {
    14651466        return isInactiveMode;
Note: See TracChangeset for help on using the changeset viewer.