From d677d9e800a1fbaf88f47d6504ccf5058eb5175b Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Fri, 15 Apr 2022 04:59:10 +0200 Subject: [PATCH] refact: better parameter names for `Warning` Signed-off-by: oSumAtrIX --- .../revanced/patcher/signature/MethodSignature.kt | 12 ++++++------ .../patcher/signature/resolver/SignatureResolver.kt | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/kotlin/app/revanced/patcher/signature/MethodSignature.kt b/src/main/kotlin/app/revanced/patcher/signature/MethodSignature.kt index cfa42bb..4086853 100644 --- a/src/main/kotlin/app/revanced/patcher/signature/MethodSignature.kt +++ b/src/main/kotlin/app/revanced/patcher/signature/MethodSignature.kt @@ -93,15 +93,15 @@ interface PatternScanMethod { /** * Represents a resolver warning. * @param expected The opcode the signature expected it to be. - * @param actual The actual opcode it was. Always different from [expected]. - * @param expectedIndex The index for [expected]. Relative to the instruction list. - * @param actualIndex The index for [actual]. Relative to the pattern list from the signature. + * @param current The current opcode in the pattern. Always different from [expected]. + * @param instructionIndex The index of the opcode relative to the instruction list. + * @param patternIndex The index of the opcode relative to the pattern list from the signature. */ data class Warning( val expected: Opcode, - val actual: Opcode, - val expectedIndex: Int, - val actualIndex: Int, + val current: Opcode, + val instructionIndex: Int, + val patternIndex: Int, ) } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patcher/signature/resolver/SignatureResolver.kt b/src/main/kotlin/app/revanced/patcher/signature/resolver/SignatureResolver.kt index 2aeee7b..01a07c2 100644 --- a/src/main/kotlin/app/revanced/patcher/signature/resolver/SignatureResolver.kt +++ b/src/main/kotlin/app/revanced/patcher/signature/resolver/SignatureResolver.kt @@ -135,8 +135,8 @@ internal class SignatureResolver( ) { this.add( PatternScanMethod.Fuzzy.Warning( - patternOpcode, originalOpcode, - patternIndex, originalIndex, + originalOpcode, patternOpcode, + originalIndex, patternIndex, ) ) }