diff options
| author | 2023-06-12 14:45:18 -0700 | |
|---|---|---|
| committer | 2023-06-12 14:45:18 -0700 | |
| commit | 5144ca8bb6f27f29ea3c660456baa7feeaf08ea9 (patch) | |
| tree | 18281d3c50bdb101775d81531f0f47fde19e8848 /src/android | |
| parent | Merge pull request #10724 from t895/auto-version-property (diff) | |
| parent | android: Use autogenerated hash code function for Game class (diff) | |
| download | yuzu-5144ca8bb6f27f29ea3c660456baa7feeaf08ea9.tar.gz yuzu-5144ca8bb6f27f29ea3c660456baa7feeaf08ea9.tar.xz yuzu-5144ca8bb6f27f29ea3c660456baa7feeaf08ea9.zip | |
Merge pull request #10728 from t895/game-hash
android: Use autogenerated hash code function for Game class
Diffstat (limited to 'src/android')
| -rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/model/Game.kt | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/Game.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/Game.kt index 3d6782c49..35d8000c5 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/Game.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/Game.kt | |||
| @@ -26,13 +26,18 @@ class Game( | |||
| 26 | if (other !is Game) | 26 | if (other !is Game) |
| 27 | return false | 27 | return false |
| 28 | 28 | ||
| 29 | return title == other.title | 29 | return hashCode() == other.hashCode() |
| 30 | && description == other.description | 30 | } |
| 31 | && regions == other.regions | 31 | |
| 32 | && path == other.path | 32 | override fun hashCode(): Int { |
| 33 | && gameId == other.gameId | 33 | var result = title.hashCode() |
| 34 | && company == other.company | 34 | result = 31 * result + description.hashCode() |
| 35 | && isHomebrew == other.isHomebrew | 35 | result = 31 * result + regions.hashCode() |
| 36 | result = 31 * result + path.hashCode() | ||
| 37 | result = 31 * result + gameId.hashCode() | ||
| 38 | result = 31 * result + company.hashCode() | ||
| 39 | result = 31 * result + isHomebrew.hashCode() | ||
| 40 | return result | ||
| 36 | } | 41 | } |
| 37 | 42 | ||
| 38 | companion object { | 43 | companion object { |