Changeset 8406 in josm


Ignore:
Timestamp:
2015-05-21T02:19:24+02:00 (6 years ago)
Author:
Don-vip
Message:

Style - Method returns modified parameter

Location:
trunk/src/org/openstreetmap/josm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java

    r8385 r8406  
    201201            return null; //could not make multipolygon.
    202202        } else {
    203             return Pair.create(selectedMultipolygonRelation, createRelation(polygon, new Relation(selectedMultipolygonRelation)));
     203            return Pair.create(selectedMultipolygonRelation, createRelation(polygon, selectedMultipolygonRelation));
    204204        }
    205205    }
     
    214214            return null; //could not make multipolygon.
    215215        } else {
    216             return Pair.create(null, createRelation(polygon, new Relation()));
     216            return Pair.create(null, createRelation(polygon, null));
    217217        }
    218218    }
     
    302302     * @return multipolygon relation
    303303     */
    304     private static Relation createRelation(MultipolygonBuilder pol, final Relation rel) {
     304    private static Relation createRelation(MultipolygonBuilder pol, Relation clone) {
    305305        // Create new relation
     306        Relation rel = clone != null ? new Relation(clone) : new Relation();
    306307        rel.put("type", "multipolygon");
    307308        // Add ways to it
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2SubGrid.java

    r8379 r8406  
    223223     * <p>This method is thread safe for both memory based and file based node data.
    224224     * @param gs GridShift object containing the coordinate to shift and the shift values
    225      * @return the GridShift object supplied, with values updated.
    226      */
    227     public NTV2GridShift interpolateGridShift(NTV2GridShift gs) {
     225     */
     226    public void interpolateGridShift(NTV2GridShift gs) {
    228227        int lonIndex = (int)((gs.getLonPositiveWestSeconds() - minLon) / lonInterval);
    229228        int latIndex = (int)((gs.getLatSeconds() - minLat) / latInterval);
    230229
    231         double X = (gs.getLonPositiveWestSeconds() - (minLon + (lonInterval * lonIndex))) / lonInterval;
    232         double Y = (gs.getLatSeconds() - (minLat + (latInterval * latIndex))) / latInterval;
     230        double x = (gs.getLonPositiveWestSeconds() - (minLon + (lonInterval * lonIndex))) / lonInterval;
     231        double y = (gs.getLatSeconds() - (minLat + (latInterval * latIndex))) / latInterval;
    233232
    234233        // Find the nodes at the four corners of the cell
     
    240239
    241240        gs.setLonShiftPositiveWestSeconds(interpolate(
    242                 lonShift[indexA], lonShift[indexB], lonShift[indexC], lonShift[indexD], X, Y));
     241                lonShift[indexA], lonShift[indexB], lonShift[indexC], lonShift[indexD], x, y));
    243242
    244243        gs.setLatShiftSeconds(interpolate(
    245                 latShift[indexA], latShift[indexB], latShift[indexC], latShift[indexD], X, Y));
     244                latShift[indexA], latShift[indexB], latShift[indexC], latShift[indexD], x, y));
    246245
    247246        if (lonAccuracy == null) {
     
    250249            gs.setLonAccuracyAvailable(true);
    251250            gs.setLonAccuracySeconds(interpolate(
    252                     lonAccuracy[indexA], lonAccuracy[indexB], lonAccuracy[indexC], lonAccuracy[indexD], X, Y));
     251                    lonAccuracy[indexA], lonAccuracy[indexB], lonAccuracy[indexC], lonAccuracy[indexD], x, y));
    253252        }
    254253
     
    258257            gs.setLatAccuracyAvailable(true);
    259258            gs.setLatAccuracySeconds(interpolate(
    260                     latAccuracy[indexA], latAccuracy[indexB], latAccuracy[indexC], latAccuracy[indexD], X, Y));
    261         }
    262         return gs;
     259                    latAccuracy[indexA], latAccuracy[indexB], latAccuracy[indexC], latAccuracy[indexD], x, y));
     260        }
    263261    }
    264262
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculator.java

    r8285 r8406  
    6767            if (wct.linkPrev) {
    6868                if (lastBackwardWay != UNCONNECTED && lastForwardWay != UNCONNECTED) {
    69                     wct = determineOnewayConnectionType(con, m, i, wct);
     69                    determineOnewayConnectionType(con, m, i, wct);
    7070                    if (!wct.linkPrev) {
    7171                        firstGroupIdx = i;
     
    139139    private int lastBackwardWay;
    140140    private boolean onewayBeginning;
    141     private WayConnectionType determineOnewayConnectionType(final List<WayConnectionType> con,
     141
     142    private void determineOnewayConnectionType(final List<WayConnectionType> con,
    142143            RelationMember m, int i, final WayConnectionType wct) {
    143144        Direction dirFW = determineDirection(lastForwardWay, con.get(lastForwardWay).direction, i);
     
    201202            }
    202203        }
    203         return wct;
    204204    }
    205205
Note: See TracChangeset for help on using the changeset viewer.