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

sonar - squid:S1444 - "public static" fields should be constant

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/util/ValUtil.java

    r10378 r11852  
    4343        Set<Point2D> cellNodes = new HashSet<>();
    4444        Point2D cell;
     45        double griddetail = OsmValidator.getGridDetail();
    4546
    4647        // First, round coordinates
    4748        // CHECKSTYLE.OFF: SingleSpaceSeparator
    48         long x0 = Math.round(n1.getEastNorth().east()  * OsmValidator.griddetail);
    49         long y0 = Math.round(n1.getEastNorth().north() * OsmValidator.griddetail);
    50         long x1 = Math.round(n2.getEastNorth().east()  * OsmValidator.griddetail);
    51         long y1 = Math.round(n2.getEastNorth().north() * OsmValidator.griddetail);
     49        long x0 = Math.round(n1.getEastNorth().east()  * griddetail);
     50        long y0 = Math.round(n1.getEastNorth().north() * griddetail);
     51        long x1 = Math.round(n2.getEastNorth().east()  * griddetail);
     52        long y1 = Math.round(n2.getEastNorth().north() * griddetail);
    5253        // CHECKSTYLE.ON: SingleSpaceSeparator
    5354
     
    7677        // Then floor coordinates, in case the way is in the border of the cell.
    7778        // CHECKSTYLE.OFF: SingleSpaceSeparator
    78         x0 = (long) Math.floor(n1.getEastNorth().east()  * OsmValidator.griddetail);
    79         y0 = (long) Math.floor(n1.getEastNorth().north() * OsmValidator.griddetail);
    80         x1 = (long) Math.floor(n2.getEastNorth().east()  * OsmValidator.griddetail);
    81         y1 = (long) Math.floor(n2.getEastNorth().north() * OsmValidator.griddetail);
     79        x0 = (long) Math.floor(n1.getEastNorth().east()  * griddetail);
     80        y0 = (long) Math.floor(n1.getEastNorth().north() * griddetail);
     81        x1 = (long) Math.floor(n2.getEastNorth().east()  * griddetail);
     82        y1 = (long) Math.floor(n2.getEastNorth().north() * griddetail);
    8283        // CHECKSTYLE.ON: SingleSpaceSeparator
    8384
Note: See TracChangeset for help on using the changeset viewer.