optimizing constant expressions in profile parsing
This commit is contained in:
parent
ef73d468c0
commit
de0acb77c5
4 changed files with 117 additions and 15 deletions
|
|
@ -91,8 +91,8 @@ public final class ProfileCache {
|
|||
|
||||
meta.readMetaData(new File(profileDir, "lookups.dat"));
|
||||
|
||||
rc.expctxWay.parseFile(profileFile, "global");
|
||||
rc.expctxNode.parseFile(profileFile, "global");
|
||||
rc.expctxWay.parseFile(profileFile, "global", rc.keyValues);
|
||||
rc.expctxNode.parseFile(profileFile, "global", rc.keyValues);
|
||||
|
||||
rc.readGlobalConfig();
|
||||
|
||||
|
|
|
|||
|
|
@ -108,16 +108,6 @@ public final class RoutingContext {
|
|||
|
||||
public void readGlobalConfig() {
|
||||
BExpressionContext expctxGlobal = expctxWay; // just one of them...
|
||||
|
||||
if (keyValues != null) {
|
||||
// add parameter to context
|
||||
for (Map.Entry<String, String> e : keyValues.entrySet()) {
|
||||
float f = Float.parseFloat(e.getValue());
|
||||
expctxWay.setVariableValue(e.getKey(), f, true);
|
||||
expctxNode.setVariableValue(e.getKey(), f, true);
|
||||
}
|
||||
}
|
||||
|
||||
setModel(expctxGlobal._modelClass);
|
||||
|
||||
carMode = 0.f != expctxGlobal.getVariableValue("validForCars", 0.f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue