diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-03-12 01:01:52 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-03-12 01:01:52 -0500 |
commit | 3663f70603fae8ed34e1e0c7500adc2c899312a5 (patch) | |
tree | 4df5bbdee93c16aaa50d3244a8149cc3356f472b /src/StardewModdingAPI/Framework/AssemblyLoader.cs | |
parent | 95e519796773a2ef17ec482e27cd4403282e2cd1 (diff) | |
download | SMAPI-3663f70603fae8ed34e1e0c7500adc2c899312a5.tar.gz SMAPI-3663f70603fae8ed34e1e0c7500adc2c899312a5.tar.bz2 SMAPI-3663f70603fae8ed34e1e0c7500adc2c899312a5.zip |
split IInstructionFinder from IInstructionRewriter (#247)
Diffstat (limited to 'src/StardewModdingAPI/Framework/AssemblyLoader.cs')
-rw-r--r-- | src/StardewModdingAPI/Framework/AssemblyLoader.cs | 4 |
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); } |