getAllBlocks() now returns a List instead of an IList

This commit is contained in:
de4dot 2012-05-29 19:06:41 +02:00
parent 7b3dcf8e05
commit 58adda95b6
3 changed files with 7 additions and 7 deletions

View File

@ -39,24 +39,24 @@ namespace de4dot.blocks {
} }
} }
public IList<BaseBlock> getAllBaseBlocks() { public List<BaseBlock> getAllBaseBlocks() {
return getTheBlocks(new List<BaseBlock>()); return getTheBlocks(new List<BaseBlock>());
} }
public IList<Block> getAllBlocks() { public List<Block> getAllBlocks() {
return getTheBlocks(new List<Block>()); return getTheBlocks(new List<Block>());
} }
public IList<Block> getAllBlocks(IList<Block> allBlocks) { public List<Block> getAllBlocks(List<Block> allBlocks) {
allBlocks.Clear(); allBlocks.Clear();
return getTheBlocks(allBlocks); return getTheBlocks(allBlocks);
} }
public IList<ScopeBlock> getAllScopeBlocks() { public List<ScopeBlock> getAllScopeBlocks() {
return getTheBlocks(new List<ScopeBlock>()); return getTheBlocks(new List<ScopeBlock>());
} }
public IList<T> getTheBlocks<T>(IList<T> list) where T : BaseBlock { public List<T> getTheBlocks<T>(List<T> list) where T : BaseBlock {
addBlocks(list, this); addBlocks(list, this);
return list; return list;
} }

View File

@ -191,7 +191,7 @@ namespace de4dot.code {
try { try {
blocks = theBlocks; blocks = theBlocks;
callResults = new List<CallResult>(); callResults = new List<CallResult>();
allBlocks = new List<Block>(blocks.MethodBlocks.getAllBlocks()); allBlocks = blocks.MethodBlocks.getAllBlocks();
findAllCallResults(); findAllCallResults();
inlineAllCalls(); inlineAllCalls();

View File

@ -291,7 +291,7 @@ namespace de4dot.code.deobfuscators.SmartAssembly {
} }
bool removeTamperProtection(Blocks blocks) { bool removeTamperProtection(Blocks blocks) {
var allBlocks = new List<Block>(blocks.MethodBlocks.getAllBlocks()); var allBlocks = blocks.MethodBlocks.getAllBlocks();
var tamperBlocks = findTamperBlocks(blocks, allBlocks); var tamperBlocks = findTamperBlocks(blocks, allBlocks);
if (tamperBlocks == null) { if (tamperBlocks == null) {