Skip to content

Commit

Permalink
rename variable in PathBidirRef
Browse files Browse the repository at this point in the history
  • Loading branch information
karussell committed Jan 13, 2017
1 parent 154d9ff commit a744026
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions core/src/main/java/com/graphhopper/routing/PathBidirRef.java
Expand Up @@ -17,7 +17,6 @@
*/ */
package com.graphhopper.routing; package com.graphhopper.routing;


import com.graphhopper.routing.util.FlagEncoder;
import com.graphhopper.routing.weighting.Weighting; import com.graphhopper.routing.weighting.Weighting;
import com.graphhopper.storage.Graph; import com.graphhopper.storage.Graph;
import com.graphhopper.storage.SPTEntry; import com.graphhopper.storage.SPTEntry;
Expand All @@ -31,7 +30,7 @@
*/ */
public class PathBidirRef extends Path { public class PathBidirRef extends Path {
protected SPTEntry edgeTo; protected SPTEntry edgeTo;
private boolean switchWrapper = false; private boolean switchFromAndToSPTEntry = false;


public PathBidirRef(Graph g, Weighting weighting) { public PathBidirRef(Graph g, Weighting weighting) {
super(g, weighting); super(g, weighting);
Expand All @@ -40,11 +39,11 @@ public PathBidirRef(Graph g, Weighting weighting) {
PathBidirRef(PathBidirRef p) { PathBidirRef(PathBidirRef p) {
super(p); super(p);
edgeTo = p.edgeTo; edgeTo = p.edgeTo;
switchWrapper = p.switchWrapper; switchFromAndToSPTEntry = p.switchFromAndToSPTEntry;
} }


public PathBidirRef setSwitchToFrom(boolean b) { public PathBidirRef setSwitchToFrom(boolean b) {
switchWrapper = b; switchFromAndToSPTEntry = b;
return this; return this;
} }


Expand All @@ -65,7 +64,7 @@ public Path extract() {
throw new IllegalStateException("Locations of the 'to'- and 'from'-Edge has to be the same." + toString() + ", fromEntry:" + sptEntry + ", toEntry:" + edgeTo); throw new IllegalStateException("Locations of the 'to'- and 'from'-Edge has to be the same." + toString() + ", fromEntry:" + sptEntry + ", toEntry:" + edgeTo);


extractSW.start(); extractSW.start();
if (switchWrapper) { if (switchFromAndToSPTEntry) {
SPTEntry ee = sptEntry; SPTEntry ee = sptEntry;
sptEntry = edgeTo; sptEntry = edgeTo;
edgeTo = ee; edgeTo = ee;
Expand Down

0 comments on commit a744026

Please sign in to comment.