-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make readFlags private, remove unnecessary int set and remove QueryGr…
…aph.getOriginalEdgeFromVirtNode, #1938
- Loading branch information
Showing
3 changed files
with
62 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -198,15 +198,13 @@ public double getExpensive(String name, EncodedValueLookup lookup, int fromEdge, | |
* @return the turn cost of the viaNode when going from "fromEdge" to "toEdge" | ||
*/ | ||
public double get(DecimalEncodedValue turnCostEnc, IntsRef tcFlags, int fromEdge, int viaNode, int toEdge) { | ||
// reset is required as we could have a QueryGraph that does not set tcFlags | ||
tcFlags.ints[0] = 0; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
karussell
Author
Member
|
||
return turnCostEnc.getDecimal(false, readFlags(tcFlags, fromEdge, viaNode, toEdge)); | ||
} | ||
|
||
/** | ||
* @return turn cost flags of the specified triple "from edge", "via node" and "to edge" | ||
*/ | ||
public IntsRef readFlags(IntsRef tcFlags, int fromEdge, int viaNode, int toEdge) { | ||
private IntsRef readFlags(IntsRef tcFlags, int fromEdge, int viaNode, int toEdge) { | ||
if (!EdgeIterator.Edge.isValid(fromEdge) || !EdgeIterator.Edge.isValid(toEdge)) | ||
throw new IllegalArgumentException("from and to edge cannot be NO_EDGE"); | ||
if (viaNode < 0) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nice! This commit did clean up some things 👍