Changeset 34659 in osm for applications


Ignore:
Timestamp:
2018-09-15T14:36:13+02:00 (6 years ago)
Author:
donvip
Message:

fix UnnecessaryParentheses warnings

Location:
applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/commandlineinterface/CLI.java

    r34525 r34659  
    131131            measuredTime = 0;
    132132            jcf = 0;
    133             //System.out.println("maxchannel: " + i);
    134133            for (int j = 0; j < runs; j++) {
    135                 //System.out.println("run: " +j);
    136134                subset.clear();
    137135                do {
    138136                    seed = cdgb.getDigraph()
    139137                    .getChannelAtPosition(
    140                             (int) ((cdgb.getDigraph().getChannels()
    141                                     .size()) * Math.random()));
     138                            (int) (cdgb.getDigraph().getChannels().size() * Math.random()));
    142139                }
    143140                while (!seed.isStrongConnected());
    144141                subset.add(seed);
    145                 //System.out.println("Seed: " + seed.getNewid());
    146142                vorChannel = seed;
    147143                for (int k = 0; k < i - 1; k++) {
     
    151147                        if (!subset.contains(tempChannel)) {
    152148                            subset.add(tempChannel);
    153                             //System.out.println("zugefügt: " + tempChannel.getNewid());
    154149                            seed = tempChannel;
    155150                            isIn = true;
     
    163158                jc.junctionSearch(subset);
    164159                measuredTime += (System.currentTimeMillis() - start);
    165                 //System.out.println("jc beendet");
    166160                measuredIterateThroughTime += jc.getMeasuredIterateTime();
    167161                measuredGenerateSubColumnTime += jc.getMeasuredGenerateTime();
    168162                jcf = jcf + jc.getJunctions().size();
    169163            }
    170             System.out.println("Channels: " + (i) +
     164            System.out.println("Channels: " + i +
    171165                    " Time(Iterate): " + (measuredIterateThroughTime/runs) +
    172166                    " Time(Generate): " + (measuredGenerateSubColumnTime/runs) +
  • applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMEntity.java

    r32596 r34659  
    171171
    172172    protected String valuestoString() {
    173         return ("ID: " + (id) + "\n" + "User: " + user + "\n");
     173        return ("ID: " + id + "\n" + "User: " + user + "\n");
    174174    }
    175175}
  • applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JMinimality.java

    r32596 r34659  
    163163                int missing = 0;
    164164                boolean smallerjunction = false;
    165                 for (int k = 0; k < ans; k++) { //Makes sure that subset of m columns contains an n*n subgrid, because ans = m over n would be 0 otherwise
     165                //Makes sure that subset of m columns contains an n*n subgrid, because ans = m over n would be 0 otherwise
     166                for (int k = 0; k < ans; k++) {
    166167                    for (int y = 0; y < n; y++) { //Iterates over all rows of subgrid k
    167168                        missing = 0;    //test = "";
    168169                        for (int x = 0; x < c.data.length; x++) { //Iterates over all columns of subgrid k
    169170                            x_i = ((Integer) L.get((int) (lindex-m+c.data[x])).get(0)); //columnindex in grid
    170                             v = ((int[][]) (L.get((int) (lindex-m+c.data[x])).get(2))); //subcolumn of grid
     171                            v = ((int[][]) L.get((int) (lindex-m+c.data[x])).get(2)); //subcolumn of grid
    171172                            y_j = v[y][0]; //rowindex in grid
    172173                            if (v[y][1] == 0) {
     
    175176                                CandidateK.add(new int[]{y_j, x_i});
    176177                            } //save entry/exit tuple
    177                             if (!smallerjunction && ((!OrEn.contains(E.get(v[y][0])))
    178                                     && (!OrEx.contains(E.get(x_i))))) { // Tests, whether y or x is not an original entry/exit
     178                            if (!smallerjunction && (!OrEn.contains(E.get(v[y][0]))
     179                                    && !OrEx.contains(E.get(x_i)))) { // Tests, whether y or x is not an original entry/exit
    179180                                smallerjunction = true; //Then k identifies a different junction than the original one
    180181                            }
  • applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JunctionChecker.java

    r33121 r34659  
    147147        for (int y = 0; y < E.size(); y++) {
    148148            for (int x = 0; x < E.size(); x++) {
    149                 if (x != y && !(entries.contains(E.get(x)))
    150                         && !(exits.contains(E.get(y)))
     149                if (x != y && !entries.contains(E.get(x))
     150                        && !exits.contains(E.get(y))
    151151                        && E.get(y).getReachableNodes().contains(E.get(x))) {
    152152                    Grid[y][x] = 1;
    153                     //log.trace("Grid-Position auf 1 gesetzT (y/x): " + y + ":"
    154                     //        + x + "(Entry/exit):" + E.get(y).getNewid() + ":" +
    155                     //        E.get(x).getNewid());
    156153                } else {
    157154                    Grid[y][x] = 0;
  • applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/util/RelationProducer.java

    r34107 r34659  
    3737            Channel c = cit.next();
    3838            // System.out.println(c.getWay().getId());
    39             if (!(ways.contains(plugin.getOsmlayer().data.getPrimitiveById(c
    40                     .getWay().getId(), OsmPrimitiveType.WAY)))) {
     39            if (!ways.contains(plugin.getOsmlayer().data.getPrimitiveById(c
     40                    .getWay().getId(), OsmPrimitiveType.WAY))) {
    4141                ways.add(plugin.getOsmlayer().data.getPrimitiveById(c.getWay()
    4242                        .getId(), OsmPrimitiveType.WAY));
Note: See TracChangeset for help on using the changeset viewer.