From 79349992a177aa1430f2eaa3d6e05f91e1d493c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sat, 23 Dec 2023 16:04:19 +0100 Subject: [PATCH] checkstyle fix, removing unneccessary code --- .../decompiler/flash/abc/ScriptPack.java | 1 - .../src/com/jpexs/decompiler/graph/Graph.java | 11 ++-- .../decompiler/flash/gui/TestNoTraits.java | 54 ------------------- 3 files changed, 5 insertions(+), 61 deletions(-) delete mode 100644 src/com/jpexs/decompiler/flash/gui/TestNoTraits.java diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ScriptPack.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ScriptPack.java index 09a480331..efc21cfda 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ScriptPack.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ScriptPack.java @@ -544,7 +544,6 @@ public class ScriptPack extends AS3ClassTreeItem { } for (int bodyIndex : bodyToPosToLine.keySet()) { - System.err.println("bi="+bodyIndex); List delIns = new ArrayList<>(); MethodBody b = abc.bodies.get(bodyIndex); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java index 0bec3ac4a..f9cd69f2c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java @@ -829,16 +829,15 @@ public class Graph { protected SecondPassData prepareSecondPass(List list) { return null; } - - protected void processSwitches(List list) { - processSwitches(list, -1); - } - - + protected void processOther(List list, long lastLoopId) { } + protected void processSwitches(List list) { + processSwitches(list, -1); + } + /* while(something){ diff --git a/src/com/jpexs/decompiler/flash/gui/TestNoTraits.java b/src/com/jpexs/decompiler/flash/gui/TestNoTraits.java deleted file mode 100644 index de0c87a95..000000000 --- a/src/com/jpexs/decompiler/flash/gui/TestNoTraits.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2023 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.gui; - -import com.jpexs.decompiler.flash.SWF; -import com.jpexs.decompiler.flash.abc.ABC; -import com.jpexs.decompiler.flash.abc.types.traits.Trait; -import com.jpexs.decompiler.flash.abc.types.traits.TraitClass; -import com.jpexs.decompiler.flash.abc.types.traits.TraitSlotConst; -import com.jpexs.decompiler.flash.tags.ABCContainerTag; -import com.jpexs.decompiler.flash.tags.Tag; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; - -/** - * - * @author JPEXS - */ -public class TestNoTraits { - public static void main(String[] args) throws IOException, InterruptedException { - SWF swf = new SWF(new FileInputStream("c:\\FlashRelated\\2162\\test_no_traits.swf"), false, false); - ABCContainerTag cnt = swf.getAbcList().get(0); - ABC abc = cnt.getABC(); - Trait t = abc.script_info.get(2).traits.traits.remove(0); - ((TraitClass)t).slot_id = 2; - //abc.script_info.get(1).traits.traits.add(0, t); - TraitSlotConst tsc = new TraitSlotConst(); - tsc.kindType = TraitSlotConst.TRAIT_SLOT; - tsc.slot_id = 2; - tsc.name_index = t.name_index; - abc.script_info.get(1).traits.traits.add(0, tsc); - //abc.script_info.get(1).traits.traits.clear(); - ((Tag) cnt).setModified(true); - try(FileOutputStream fos = new FileOutputStream("c:\\FlashRelated\\2162\\test_no_traits_mod.swf")) { - swf.saveTo(fos); - } - - } -}