Refactoring
This commit is contained in:
parent
e1ff8fb39c
commit
738905d6d8
@ -427,7 +427,7 @@ public class FlightConfiguration implements FlightConfigurableParameter<FlightCo
|
|||||||
|
|
||||||
// constructs entry in-place if this component is active
|
// constructs entry in-place if this component is active
|
||||||
if (this.isComponentActive(component)) {
|
if (this.isComponentActive(component)) {
|
||||||
results.emplace(component, this.isComponentActive(component), currentInstanceNumber, currentTransform);
|
results.emplace(component, currentInstanceNumber, currentTransform);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(RocketComponent child : component.getChildren()) {
|
for(RocketComponent child : component.getChildren()) {
|
||||||
|
@ -27,15 +27,13 @@ public class InstanceMap extends ConcurrentHashMap<RocketComponent, ArrayList<In
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void emplace(final RocketComponent component, boolean active, int number, final Transformation xform) {
|
public void emplace(final RocketComponent component, int number, final Transformation transform) {
|
||||||
final RocketComponent key = component;
|
if (!containsKey(component)) {
|
||||||
|
put(component, new ArrayList<>());
|
||||||
if(!containsKey(component)) {
|
|
||||||
put(key, new ArrayList<InstanceContext>());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final InstanceContext context = new InstanceContext(component, number, xform);
|
final InstanceContext context = new InstanceContext(component, number, transform);
|
||||||
get(key).add(context);
|
get(component).add(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<InstanceContext> getInstanceContexts(final RocketComponent key) {
|
public List<InstanceContext> getInstanceContexts(final RocketComponent key) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user