Browse Source
Merge pull request #10728 from t895/game-hash
android: Use autogenerated hash code function for Game class
pull/15/merge
bunnei
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
12 additions and
7 deletions
-
src/android/app/src/main/java/org/yuzu/yuzu_emu/model/Game.kt
|
|
|
@ -26,13 +26,18 @@ class Game( |
|
|
|
if (other !is Game) |
|
|
|
return false |
|
|
|
|
|
|
|
return title == other.title |
|
|
|
&& description == other.description |
|
|
|
&& regions == other.regions |
|
|
|
&& path == other.path |
|
|
|
&& gameId == other.gameId |
|
|
|
&& company == other.company |
|
|
|
&& isHomebrew == other.isHomebrew |
|
|
|
return hashCode() == other.hashCode() |
|
|
|
} |
|
|
|
|
|
|
|
override fun hashCode(): Int { |
|
|
|
var result = title.hashCode() |
|
|
|
result = 31 * result + description.hashCode() |
|
|
|
result = 31 * result + regions.hashCode() |
|
|
|
result = 31 * result + path.hashCode() |
|
|
|
result = 31 * result + gameId.hashCode() |
|
|
|
result = 31 * result + company.hashCode() |
|
|
|
result = 31 * result + isHomebrew.hashCode() |
|
|
|
return result |
|
|
|
} |
|
|
|
|
|
|
|
companion object { |
|
|
|
|