add: MutableMethodImplementation.addInstructions extension

This commit is contained in:
oSumAtrIX
2022-04-06 23:09:16 +02:00
parent 9a67aa3ff4
commit dde0a22642

View File

@@ -1,5 +1,13 @@
package app.revanced.patcher.extensions
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.builder.BuilderInstruction
import org.jf.dexlib2.builder.MutableMethodImplementation
infix fun AccessFlags.or(other: AccessFlags) = this.value or other.value
infix fun AccessFlags.or(other: AccessFlags) = this.value or other.value
fun MutableMethodImplementation.addInstructions(index: Int, instructions: List<BuilderInstruction>) {
for (i in instructions.lastIndex downTo 0) {
this.addInstruction(index, instructions[i])
}
}