file formatting
This commit is contained in:
parent
7ea1f89c71
commit
d8363a0108
1 changed files with 11 additions and 12 deletions
|
@ -224,7 +224,7 @@ public class RouteDataObject {
|
||||||
|
|
||||||
public float getMaximumSpeed(boolean direction){
|
public float getMaximumSpeed(boolean direction){
|
||||||
int sz = types.length;
|
int sz = types.length;
|
||||||
float maxSpeed = 0;
|
float maxSpeed = 0;
|
||||||
for (int i = 0; i < sz; i++) {
|
for (int i = 0; i < sz; i++) {
|
||||||
RouteTypeRule r = region.quickGetEncodingRule(types[i]);
|
RouteTypeRule r = region.quickGetEncodingRule(types[i]);
|
||||||
if(r.isForward() != 0) {
|
if(r.isForward() != 0) {
|
||||||
|
@ -232,19 +232,18 @@ public class RouteDataObject {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
float mx = r.maxSpeed();
|
float mx = r.maxSpeed();
|
||||||
if (mx > 0) {
|
if (mx > 0) {
|
||||||
maxSpeed = mx;
|
maxSpeed = mx;
|
||||||
// conditional has priority
|
// conditional has priority
|
||||||
if(r.conditional()) {
|
if(r.conditional()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return maxSpeed ;
|
return maxSpeed ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static float parseSpeed(String v, float def) {
|
public static float parseSpeed(String v, float def) {
|
||||||
if(v.equals("none")) {
|
if(v.equals("none")) {
|
||||||
return RouteDataObject.NONE_MAX_SPEED;
|
return RouteDataObject.NONE_MAX_SPEED;
|
||||||
|
|
Loading…
Reference in a new issue