summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-03-12 01:01:52 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-03-12 01:01:52 -0500
commit3663f70603fae8ed34e1e0c7500adc2c899312a5 (patch)
tree4df5bbdee93c16aaa50d3244a8149cc3356f472b /src/StardewModdingAPI
parent95e519796773a2ef17ec482e27cd4403282e2cd1 (diff)
downloadSMAPI-3663f70603fae8ed34e1e0c7500adc2c899312a5.tar.gz
SMAPI-3663f70603fae8ed34e1e0c7500adc2c899312a5.tar.bz2
SMAPI-3663f70603fae8ed34e1e0c7500adc2c899312a5.zip
split IInstructionFinder from IInstructionRewriter (#247)
Diffstat (limited to 'src/StardewModdingAPI')
-rw-r--r--src/StardewModdingAPI/Framework/AssemblyLoader.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/StardewModdingAPI/Framework/AssemblyLoader.cs b/src/StardewModdingAPI/Framework/AssemblyLoader.cs
index a932a47c..eb5d1cf4 100644
--- a/src/StardewModdingAPI/Framework/AssemblyLoader.cs
+++ b/src/StardewModdingAPI/Framework/AssemblyLoader.cs
@@ -193,7 +193,7 @@ namespace StardewModdingAPI.Framework
foreach (MethodDefinition method in this.GetMethods(module))
{
// skip methods with no rewritable instructions
- bool canRewrite = method.Body.Instructions.Any(op => rewriters.Any(rewriter => rewriter.ShouldRewrite(op, platformChanged)));
+ bool canRewrite = method.Body.Instructions.Any(op => rewriters.Any(rewriter => rewriter.IsMatch(op, platformChanged)));
if (!canRewrite)
continue;
@@ -203,7 +203,7 @@ namespace StardewModdingAPI.Framework
// rewrite instructions
foreach (Instruction op in cil.Body.Instructions.ToArray())
{
- IInstructionRewriter rewriter = rewriters.FirstOrDefault(p => p.ShouldRewrite(op, platformChanged));
+ IInstructionRewriter rewriter = rewriters.FirstOrDefault(p => p.IsMatch(op, platformChanged));
rewriter?.Rewrite(module, cil, op, this.AssemblyMap);
}