Ignore:
Timestamp:
2016-07-29T00:02:17+02:00 (8 years ago)
Author:
Don-vip
Message:

see #12472 - fix "OperatorPrecedence" warnings

Location:
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java

    r10657 r10670  
    884884            }
    885885            final Way way = (Way) env.osm;
    886             return way.isClosed() && Geometry.isClockwise(way)
    887                     || !way.isClosed() && way.getNodesCount() > 2 && Geometry.angleIsClockwise(way.getNode(0), way.getNode(1), way.lastNode());
     886            return (way.isClosed() && Geometry.isClockwise(way))
     887                || (!way.isClosed() && way.getNodesCount() > 2 && Geometry.angleIsClockwise(way.getNode(0), way.getNode(1), way.lastNode()));
    888888        }
    889889
     
    900900            }
    901901            final Way way = (Way) env.osm;
    902             return way.isClosed() && !Geometry.isClockwise(way)
    903                     || !way.isClosed() && way.getNodesCount() > 2 && !Geometry.angleIsClockwise(way.getNode(0), way.getNode(1), way.lastNode());
     902            return (way.isClosed() && !Geometry.isClockwise(way))
     903                || (!way.isClosed() && way.getNodesCount() > 2 && !Geometry.angleIsClockwise(way.getNode(0), way.getNode(1), way.lastNode()));
    904904        }
    905905
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java

    r10659 r10670  
    277277            public void visit(Node n) {
    278278                if (e.child == null && left.matches(new Environment(n).withParent(e.osm))) {
    279                     if (e.osm instanceof Way && Geometry.nodeInsidePolygon(n, ((Way) e.osm).getNodes())
    280                             || e.osm instanceof Relation && (
    281                                     (Relation) e.osm).isMultipolygon() && Geometry.isNodeInsideMultiPolygon(n, (Relation) e.osm, null)) {
     279                    if ((e.osm instanceof Way && Geometry.nodeInsidePolygon(n, ((Way) e.osm).getNodes()))
     280                            || (e.osm instanceof Relation && (
     281                                    (Relation) e.osm).isMultipolygon() && Geometry.isNodeInsideMultiPolygon(n, (Relation) e.osm, null))) {
    282282                        e.child = n;
    283283                    }
     
    288288            public void visit(Way w) {
    289289                if (e.child == null && left.matches(new Environment(w).withParent(e.osm))) {
    290                     if (e.osm instanceof Way && Geometry.PolygonIntersection.FIRST_INSIDE_SECOND.equals(
    291                             Geometry.polygonIntersection(w.getNodes(), ((Way) e.osm).getNodes()))
    292                             || e.osm instanceof Relation && (
     290                    if ((e.osm instanceof Way && Geometry.PolygonIntersection.FIRST_INSIDE_SECOND.equals(
     291                            Geometry.polygonIntersection(w.getNodes(), ((Way) e.osm).getNodes())))
     292                            || (e.osm instanceof Relation && (
    293293                                    (Relation) e.osm).isMultipolygon()
    294                                     && Geometry.isPolygonInsideMultiPolygon(w.getNodes(), (Relation) e.osm, null)) {
     294                                    && Geometry.isPolygonInsideMultiPolygon(w.getNodes(), (Relation) e.osm, null))) {
    295295                        e.child = w;
    296296                    }
Note: See TracChangeset for help on using the changeset viewer.