From 660315195747e23542a54cb6fea62af9e6012a83 Mon Sep 17 00:00:00 2001 From: Daniel Kirschten Date: Mon, 16 Sep 2019 17:52:20 +0200 Subject: [PATCH] Removed legacy code from ModelSplitter --- .../model/components/atomic/ModelSplitter.java | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelSplitter.java b/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelSplitter.java index 962f2acc..b47f50ba 100644 --- a/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelSplitter.java +++ b/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelSplitter.java @@ -148,18 +148,7 @@ public class ModelSplitter extends ModelComponent static { LogicCoreAdapter.addComponentAdapter(new SplitterAdapter()); - IndirectModelComponentCreator.setComponentSupplier(ModelSplitter.class.getCanonicalName(), (m, p, n) -> - { - // TODO remove legacy params parsing - SplitterParams params; - if (p.isJsonPrimitive()) - { - params = new SplitterParams(); - params.logicWidth = p.getAsInt(); - params.orientation = Orientation.RIGHT; - } else - params = JsonHandler.fromJsonTree(p, SplitterParams.class); - return new ModelSplitter(m, params, n); - }); + IndirectModelComponentCreator.setComponentSupplier(ModelSplitter.class.getCanonicalName(), + (m, p, n) -> new ModelSplitter(m, JsonHandler.fromJsonTree(p, SplitterParams.class), n)); } } \ No newline at end of file -- 2.17.1