Finish tests, add InsnList.setAt, sr -> sd

Added some sweet explanation too.
This commit is contained in:
Lucaskyy
2022-03-19 23:15:20 +01:00
parent 61c0541ef5
commit 8c56d15823
3 changed files with 17 additions and 4 deletions

View File

@@ -6,7 +6,7 @@ import org.objectweb.asm.tree.MethodNode
data class PatchData(
val cls: ClassNode,
val method: MethodNode,
val sr: ScanData
val sd: ScanData
)
data class ScanData(

View File

@@ -1,9 +1,10 @@
package net.revanced.patcher.writer
import org.objectweb.asm.tree.AbstractInsnNode
import org.objectweb.asm.tree.InsnList
object ASMWriter {
fun InsnList.testingWow() {
fun InsnList.setAt(index: Int, node: AbstractInsnNode) {
this[this.get(index)] = node
}
}