Ignore:
Timestamp:
2016-05-11T02:44:10+02:00 (4 years ago)
Author:
Don-vip
Message:

sonar - squid:AssignmentInSubExpressionCheck - Assignments should not be made from within sub-expressions

Location:
trunk/src/org/openstreetmap/josm/actions/mapmode
Files:
2 edited

Legend:

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

    r10001 r10179  
    16651665                }
    16661666            }
    1667             return projected = new EastNorth(e0+l*pe, n0+l*pn);
     1667            projected = new EastNorth(e0+l*pe, n0+l*pn);
     1668            return projected;
    16681669        }
    16691670
  • trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java

    r10043 r10179  
    725725                ((MoveCommand) c).applyVectorTo(currentEN);
    726726            } else {
    727                 Main.main.undoRedo.add(
    728                         c = new MoveCommand(selection, startEN, currentEN));
     727                c = new MoveCommand(selection, startEN, currentEN);
     728                Main.main.undoRedo.add(c);
    729729            }
    730730            for (Node n : affectedNodes) {
     
    834834                limit -= ((Way) osm).getNodes().size();
    835835            }
    836             if ((limit -= 1) < 0) {
     836            if (--limit < 0) {
    837837                break;
    838838            }
     
    12001200                    w = ws.way;
    12011201
    1202                     Point2D p1 = mv.getPoint2D(wnp.a = w.getNode(ws.lowerIndex));
    1203                     Point2D p2 = mv.getPoint2D(wnp.b = w.getNode(ws.lowerIndex + 1));
     1202                    wnp.a = w.getNode(ws.lowerIndex);
     1203                    wnp.b = w.getNode(ws.lowerIndex + 1);
     1204                    Point2D p1 = mv.getPoint2D(wnp.a);
     1205                    Point2D p2 = mv.getPoint2D(wnp.b);
    12041206                    if (WireframeMapRenderer.isLargeSegment(p1, p2, virtualSpace)) {
    12051207                        Point2D pc = new Point2D.Double((p1.getX() + p2.getX()) / 2, (p1.getY() + p2.getY()) / 2);
Note: See TracChangeset for help on using the changeset viewer.