small fixes, unused code removed

This commit is contained in:
honfika@gmail.com
2014-11-16 21:03:17 +01:00
parent 6d3974db53
commit ef34bb535b
5 changed files with 6 additions and 96 deletions

View File

@@ -648,7 +648,7 @@ public final class SWF implements SWFContainerItem, Timelined {
}
private void findABCTags() {
List<ContainerItem> objs = new ArrayList<>();
List<ContainerItem> objs = new ArrayList<>(tags.size());
objs.addAll(tags);
ArrayList<ABCContainerTag> newAbcList = new ArrayList<>();

View File

@@ -2209,9 +2209,9 @@ public class SWFInputStream implements AutoCloseable {
* @throws IOException
*/
public List<FILTER> readFILTERLIST(String name) throws IOException {
List<FILTER> ret = new ArrayList<>();
newDumpLevel(name, "FILTERLIST");
int numberOfFilters = readUI8("numberOfFilters");
List<FILTER> ret = new ArrayList<>(numberOfFilters);
for (int i = 0; i < numberOfFilters; i++) {
ret.add(readFILTER("filter"));
}

View File

@@ -12,7 +12,8 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
* License along with this library.
*/
package com.jpexs.decompiler.flash;
import com.jpexs.helpers.Helper;
@@ -61,7 +62,7 @@ public class SWFSearch {
}
public void process() {
public void process() {
Map<Long, InputStream> ret;
ret = s.search(new ProgressListener() {
@Override
public void progress(int p) {

View File

@@ -118,11 +118,10 @@ public class LoadFromMemoryFrame extends AppFrame implements ActionListener {
@Override
protected List<SwfInMemory> doInBackground() throws Exception {
Map<Long, InputStream> ret = new HashMap<>();
List<SwfInMemory> swfStreams = new ArrayList<>();
for (com.jpexs.process.Process proc : procs) {
publish(proc);
ret = proc.search(new ProgressListener() {
Map<Long, InputStream> ret = proc.search(new ProgressListener() {
@Override
public void progress(int p) {
setProgress(p);

View File

@@ -807,96 +807,6 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
}
}
public static void getShapes(List<ContainerItem> list, List<Tag> shapes) {
for (ContainerItem t : list) {
if (t instanceof Container) {
getShapes(((Container) t).getSubItems(), shapes);
}
if ((t instanceof DefineShapeTag)
|| (t instanceof DefineShape2Tag)
|| (t instanceof DefineShape3Tag)
|| (t instanceof DefineShape4Tag)) {
shapes.add((Tag) t);
}
}
}
public static void getFonts(List<ContainerItem> list, List<Tag> fonts) {
for (ContainerItem t : list) {
if (t instanceof Container) {
getFonts(((Container) t).getSubItems(), fonts);
}
if ((t instanceof DefineFontTag)
|| (t instanceof DefineFont2Tag)
|| (t instanceof DefineFont3Tag)
|| (t instanceof DefineFont4Tag)) {
fonts.add((Tag) t);
}
}
}
public static void getMorphShapes(List<ContainerItem> list, List<Tag> morphShapes) {
for (ContainerItem t : list) {
if (t instanceof Container) {
getMorphShapes(((Container) t).getSubItems(), morphShapes);
}
if ((t instanceof DefineMorphShapeTag) || (t instanceof DefineMorphShape2Tag)) {
morphShapes.add((Tag) t);
}
}
}
public static void getImages(List<ContainerItem> list, List<Tag> images) {
for (ContainerItem t : list) {
if (t instanceof Container) {
getImages(((Container) t).getSubItems(), images);
}
if ((t instanceof DefineBitsTag)
|| (t instanceof DefineBitsJPEG2Tag)
|| (t instanceof DefineBitsJPEG3Tag)
|| (t instanceof DefineBitsJPEG4Tag)
|| (t instanceof DefineBitsLosslessTag)
|| (t instanceof DefineBitsLossless2Tag)) {
images.add((Tag) t);
}
}
}
public static void getTexts(List<ContainerItem> list, List<Tag> texts) {
for (ContainerItem t : list) {
if (t instanceof Container) {
getTexts(((Container) t).getSubItems(), texts);
}
if ((t instanceof DefineTextTag)
|| (t instanceof DefineText2Tag)
|| (t instanceof DefineEditTextTag)) {
texts.add((Tag) t);
}
}
}
public static void getSprites(List<ContainerItem> list, List<Tag> sprites) {
for (ContainerItem t : list) {
if (t instanceof Container) {
getSprites(((Container) t).getSubItems(), sprites);
}
if (t instanceof DefineSpriteTag) {
sprites.add((Tag) t);
}
}
}
public static void getButtons(List<ContainerItem> list, List<Tag> buttons) {
for (ContainerItem t : list) {
if (t instanceof Container) {
getButtons(((Container) t).getSubItems(), buttons);
}
if ((t instanceof DefineButtonTag) || (t instanceof DefineButton2Tag)) {
buttons.add((Tag) t);
}
}
}
public void renameIdentifier(SWF swf, String identifier) throws InterruptedException {
String oldName = identifier;
String newName = View.showInputDialog(translate("rename.enternew"), oldName);