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>());
}
public IList<Block> getAllBlocks() {
public List<Block> getAllBlocks() {
return getTheBlocks(new List<Block>());
}
public IList<Block> getAllBlocks(IList<Block> allBlocks) {
public List<Block> getAllBlocks(List<Block> allBlocks) {
allBlocks.Clear();
return getTheBlocks(allBlocks);
}
public IList<ScopeBlock> getAllScopeBlocks() {
public List<ScopeBlock> getAllScopeBlocks() {
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);
return list;
}

View File

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

View File

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