Skip to content
Snippets Groups Projects
Commit 6cf39c8d authored by Nikolaus Krismer's avatar Nikolaus Krismer
Browse files

minor speedup in node equals (by switching statment order in if)

parent 251dc303
No related branches found
No related tags found
No related merge requests found
......@@ -95,7 +95,7 @@ public class Node implements Comparable<Node> {
}
Node other = (Node) obj;
if (Double.doubleToLongBits(distance) != Double.doubleToLongBits(other.distance) || id != other.id) {
if (id != other.id || Double.doubleToLongBits(distance) != Double.doubleToLongBits(other.distance)) {
return false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment