From 2cbe6ce8e0066cdbbb4b62ee5ebde2f724f4d058 Mon Sep 17 00:00:00 2001 From: Graham Date: Sat, 6 Jun 2020 15:29:51 +0100 Subject: [PATCH] Rename UNKNOWN to ONCE_OR_MORE Signed-off-by: Graham --- .../java/dev/openrs2/deob/analysis/FieldWriteAnalyzer.kt | 8 ++++---- .../java/dev/openrs2/deob/analysis/FieldWriteCount.kt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/deob/src/main/java/dev/openrs2/deob/analysis/FieldWriteAnalyzer.kt b/deob/src/main/java/dev/openrs2/deob/analysis/FieldWriteAnalyzer.kt index 86ecca29fa..9d6d63108b 100644 --- a/deob/src/main/java/dev/openrs2/deob/analysis/FieldWriteAnalyzer.kt +++ b/deob/src/main/java/dev/openrs2/deob/analysis/FieldWriteAnalyzer.kt @@ -47,7 +47,7 @@ class FieldWriteAnalyzer( count1 == null && count2 != null -> count2 count2 == null && count1 != null -> count1 count1 == count2 -> count1!! - else -> FieldWriteCount.UNKNOWN + else -> FieldWriteCount.ONCE_OR_MORE } } @@ -81,10 +81,10 @@ class FieldWriteAnalyzer( val count = set.getOrDefault(member, FieldWriteCount.NEVER) return when { isThis && count == FieldWriteCount.NEVER -> set.plus(Pair(member, FieldWriteCount.EXACTLY_ONCE)) - isThis && count == FieldWriteCount.EXACTLY_ONCE -> set.plus(Pair(member, FieldWriteCount.UNKNOWN)) + isThis && count == FieldWriteCount.EXACTLY_ONCE -> set.plus(Pair(member, FieldWriteCount.ONCE_OR_MORE)) // save an allocation if count is already set to UNKNOWN - count == FieldWriteCount.UNKNOWN -> set - else -> set.plus(Pair(member, FieldWriteCount.UNKNOWN)) + count == FieldWriteCount.ONCE_OR_MORE -> set + else -> set.plus(Pair(member, FieldWriteCount.ONCE_OR_MORE)) } } } diff --git a/deob/src/main/java/dev/openrs2/deob/analysis/FieldWriteCount.kt b/deob/src/main/java/dev/openrs2/deob/analysis/FieldWriteCount.kt index 6e0c4f7682..a74851a0c5 100644 --- a/deob/src/main/java/dev/openrs2/deob/analysis/FieldWriteCount.kt +++ b/deob/src/main/java/dev/openrs2/deob/analysis/FieldWriteCount.kt @@ -3,5 +3,5 @@ package dev.openrs2.deob.analysis enum class FieldWriteCount { NEVER, EXACTLY_ONCE, - UNKNOWN + ONCE_OR_MORE }