From 58adda95b63c566da527ad0f3a319d3dbc5a4241 Mon Sep 17 00:00:00 2001 From: de4dot Date: Tue, 29 May 2012 19:06:41 +0200 Subject: [PATCH] getAllBlocks() now returns a List instead of an IList --- blocks/ScopeBlock.cs | 10 +++++----- de4dot.code/MethodReturnValueInliner.cs | 2 +- .../SmartAssembly/TamperProtectionRemover.cs | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/blocks/ScopeBlock.cs b/blocks/ScopeBlock.cs index 0ef904ff..3f00f31f 100644 --- a/blocks/ScopeBlock.cs +++ b/blocks/ScopeBlock.cs @@ -39,24 +39,24 @@ namespace de4dot.blocks { } } - public IList getAllBaseBlocks() { + public List getAllBaseBlocks() { return getTheBlocks(new List()); } - public IList getAllBlocks() { + public List getAllBlocks() { return getTheBlocks(new List()); } - public IList getAllBlocks(IList allBlocks) { + public List getAllBlocks(List allBlocks) { allBlocks.Clear(); return getTheBlocks(allBlocks); } - public IList getAllScopeBlocks() { + public List getAllScopeBlocks() { return getTheBlocks(new List()); } - public IList getTheBlocks(IList list) where T : BaseBlock { + public List getTheBlocks(List list) where T : BaseBlock { addBlocks(list, this); return list; } diff --git a/de4dot.code/MethodReturnValueInliner.cs b/de4dot.code/MethodReturnValueInliner.cs index ba2480ba..ab5e79cb 100644 --- a/de4dot.code/MethodReturnValueInliner.cs +++ b/de4dot.code/MethodReturnValueInliner.cs @@ -191,7 +191,7 @@ namespace de4dot.code { try { blocks = theBlocks; callResults = new List(); - allBlocks = new List(blocks.MethodBlocks.getAllBlocks()); + allBlocks = blocks.MethodBlocks.getAllBlocks(); findAllCallResults(); inlineAllCalls(); diff --git a/de4dot.code/deobfuscators/SmartAssembly/TamperProtectionRemover.cs b/de4dot.code/deobfuscators/SmartAssembly/TamperProtectionRemover.cs index d6c44a8e..b8e0ee11 100644 --- a/de4dot.code/deobfuscators/SmartAssembly/TamperProtectionRemover.cs +++ b/de4dot.code/deobfuscators/SmartAssembly/TamperProtectionRemover.cs @@ -291,7 +291,7 @@ namespace de4dot.code.deobfuscators.SmartAssembly { } bool removeTamperProtection(Blocks blocks) { - var allBlocks = new List(blocks.MethodBlocks.getAllBlocks()); + var allBlocks = blocks.MethodBlocks.getAllBlocks(); var tamperBlocks = findTamperBlocks(blocks, allBlocks); if (tamperBlocks == null) {