Skip to content

Commit

Permalink
fix: Make Equals() not require pointers to the struct
Browse files Browse the repository at this point in the history
Makes the operation consistent with the nex-go types and fixes the
comparison since the structs aren't stored as pointers inside other
structs anymore.
  • Loading branch information
DaniElectra committed Dec 24, 2024
1 parent cae70e4 commit 3a010e1
Show file tree
Hide file tree
Showing 300 changed files with 600 additions and 600 deletions.
4 changes: 2 additions & 2 deletions aa-user/types/application_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ func (ai ApplicationInfo) Copy() types.RVType {

// Equals checks if the given ApplicationInfo contains the same data as the current ApplicationInfo
func (ai ApplicationInfo) Equals(o types.RVType) bool {
if _, ok := o.(*ApplicationInfo); !ok {
if _, ok := o.(ApplicationInfo); !ok {
return false
}

other := o.(*ApplicationInfo)
other := o.(ApplicationInfo)

if ai.StructureVersion != other.StructureVersion {
return false
Expand Down
4 changes: 2 additions & 2 deletions account-management/types/account_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ func (ad AccountData) Copy() types.RVType {

// Equals checks if the given AccountData contains the same data as the current AccountData
func (ad AccountData) Equals(o types.RVType) bool {
if _, ok := o.(*AccountData); !ok {
if _, ok := o.(AccountData); !ok {
return false
}

other := o.(*AccountData)
other := o.(AccountData)

if ad.StructureVersion != other.StructureVersion {
return false
Expand Down
4 changes: 2 additions & 2 deletions account-management/types/account_extra_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ func (aei AccountExtraInfo) Copy() types.RVType {

// Equals checks if the given AccountExtraInfo contains the same data as the current AccountExtraInfo
func (aei AccountExtraInfo) Equals(o types.RVType) bool {
if _, ok := o.(*AccountExtraInfo); !ok {
if _, ok := o.(AccountExtraInfo); !ok {
return false
}

other := o.(*AccountExtraInfo)
other := o.(AccountExtraInfo)

if aei.StructureVersion != other.StructureVersion {
return false
Expand Down
4 changes: 2 additions & 2 deletions account-management/types/basic_account_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ func (bai BasicAccountInfo) Copy() types.RVType {

// Equals checks if the given BasicAccountInfo contains the same data as the current BasicAccountInfo
func (bai BasicAccountInfo) Equals(o types.RVType) bool {
if _, ok := o.(*BasicAccountInfo); !ok {
if _, ok := o.(BasicAccountInfo); !ok {
return false
}

other := o.(*BasicAccountInfo)
other := o.(BasicAccountInfo)

if bai.StructureVersion != other.StructureVersion {
return false
Expand Down
4 changes: 2 additions & 2 deletions account-management/types/nintendo_create_account_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ func (ncad NintendoCreateAccountData) Copy() types.RVType {

// Equals checks if the given NintendoCreateAccountData contains the same data as the current NintendoCreateAccountData
func (ncad NintendoCreateAccountData) Equals(o types.RVType) bool {
if _, ok := o.(*NintendoCreateAccountData); !ok {
if _, ok := o.(NintendoCreateAccountData); !ok {
return false
}

other := o.(*NintendoCreateAccountData)
other := o.(NintendoCreateAccountData)

if ncad.StructureVersion != other.StructureVersion {
return false
Expand Down
4 changes: 2 additions & 2 deletions datastore/miitopia/types/mii_tube_mii_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ func (mtmi MiiTubeMiiInfo) Copy() types.RVType {

// Equals checks if the given MiiTubeMiiInfo contains the same data as the current MiiTubeMiiInfo
func (mtmi MiiTubeMiiInfo) Equals(o types.RVType) bool {
if _, ok := o.(*MiiTubeMiiInfo); !ok {
if _, ok := o.(MiiTubeMiiInfo); !ok {
return false
}

other := o.(*MiiTubeMiiInfo)
other := o.(MiiTubeMiiInfo)

if !mtmi.MetaInfo.Equals(other.MetaInfo) {
return false
Expand Down
4 changes: 2 additions & 2 deletions datastore/miitopia/types/mii_tube_search_param.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ func (mtsp MiiTubeSearchParam) Copy() types.RVType {

// Equals checks if the given MiiTubeSearchParam contains the same data as the current MiiTubeSearchParam
func (mtsp MiiTubeSearchParam) Equals(o types.RVType) bool {
if _, ok := o.(*MiiTubeSearchParam); !ok {
if _, ok := o.(MiiTubeSearchParam); !ok {
return false
}

other := o.(*MiiTubeSearchParam)
other := o.(MiiTubeSearchParam)

if !mtsp.Name.Equals(other.Name) {
return false
Expand Down
4 changes: 2 additions & 2 deletions datastore/miitopia/types/mii_tube_search_result.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ func (mtsr MiiTubeSearchResult) Copy() types.RVType {

// Equals checks if the given MiiTubeSearchResult contains the same data as the current MiiTubeSearchResult
func (mtsr MiiTubeSearchResult) Equals(o types.RVType) bool {
if _, ok := o.(*MiiTubeSearchResult); !ok {
if _, ok := o.(MiiTubeSearchResult); !ok {
return false
}

other := o.(*MiiTubeSearchResult)
other := o.(MiiTubeSearchResult)

if !mtsr.Result.Equals(other.Result) {
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ func (dsgmboidp DataStoreGetMetaByOwnerIDParam) Copy() types.RVType {

// Equals checks if the given DataStoreGetMetaByOwnerIDParam contains the same data as the current DataStoreGetMetaByOwnerIDParam
func (dsgmboidp DataStoreGetMetaByOwnerIDParam) Equals(o types.RVType) bool {
if _, ok := o.(*DataStoreGetMetaByOwnerIDParam); !ok {
if _, ok := o.(DataStoreGetMetaByOwnerIDParam); !ok {
return false
}

other := o.(*DataStoreGetMetaByOwnerIDParam)
other := o.(DataStoreGetMetaByOwnerIDParam)

if dsgmboidp.StructureVersion != other.StructureVersion {
return false
Expand Down
4 changes: 2 additions & 2 deletions datastore/pokemon-bank/types/bank_migration_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ func (bmi BankMigrationInfo) Copy() types.RVType {

// Equals checks if the given BankMigrationInfo contains the same data as the current BankMigrationInfo
func (bmi BankMigrationInfo) Equals(o types.RVType) bool {
if _, ok := o.(*BankMigrationInfo); !ok {
if _, ok := o.(BankMigrationInfo); !ok {
return false
}

other := o.(*BankMigrationInfo)
other := o.(BankMigrationInfo)

if bmi.StructureVersion != other.StructureVersion {
return false
Expand Down
4 changes: 2 additions & 2 deletions datastore/pokemon-bank/types/bank_transaction_param.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ func (btp BankTransactionParam) Copy() types.RVType {

// Equals checks if the given BankTransactionParam contains the same data as the current BankTransactionParam
func (btp BankTransactionParam) Equals(o types.RVType) bool {
if _, ok := o.(*BankTransactionParam); !ok {
if _, ok := o.(BankTransactionParam); !ok {
return false
}

other := o.(*BankTransactionParam)
other := o.(BankTransactionParam)

if btp.StructureVersion != other.StructureVersion {
return false
Expand Down
4 changes: 2 additions & 2 deletions datastore/pokemon-bank/types/global_trade_station_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ func (gtsd GlobalTradeStationData) Copy() types.RVType {

// Equals checks if the given GlobalTradeStationData contains the same data as the current GlobalTradeStationData
func (gtsd GlobalTradeStationData) Equals(o types.RVType) bool {
if _, ok := o.(*GlobalTradeStationData); !ok {
if _, ok := o.(GlobalTradeStationData); !ok {
return false
}

other := o.(*GlobalTradeStationData)
other := o.(GlobalTradeStationData)

if gtsd.StructureVersion != other.StructureVersion {
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ func (gtsdpp GlobalTradeStationDeletePokemonParam) Copy() types.RVType {

// Equals checks if the given GlobalTradeStationDeletePokemonParam contains the same data as the current GlobalTradeStationDeletePokemonParam
func (gtsdpp GlobalTradeStationDeletePokemonParam) Equals(o types.RVType) bool {
if _, ok := o.(*GlobalTradeStationDeletePokemonParam); !ok {
if _, ok := o.(GlobalTradeStationDeletePokemonParam); !ok {
return false
}

other := o.(*GlobalTradeStationDeletePokemonParam)
other := o.(GlobalTradeStationDeletePokemonParam)

if gtsdpp.StructureVersion != other.StructureVersion {
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ func (gtsdmpp GlobalTradeStationDownloadMyPokemonParam) Copy() types.RVType {

// Equals checks if the given GlobalTradeStationDownloadMyPokemonParam contains the same data as the current GlobalTradeStationDownloadMyPokemonParam
func (gtsdmpp GlobalTradeStationDownloadMyPokemonParam) Equals(o types.RVType) bool {
if _, ok := o.(*GlobalTradeStationDownloadMyPokemonParam); !ok {
if _, ok := o.(GlobalTradeStationDownloadMyPokemonParam); !ok {
return false
}

other := o.(*GlobalTradeStationDownloadMyPokemonParam)
other := o.(GlobalTradeStationDownloadMyPokemonParam)

if gtsdmpp.StructureVersion != other.StructureVersion {
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ func (gtsdmpr GlobalTradeStationDownloadMyPokemonResult) Copy() types.RVType {

// Equals checks if the given GlobalTradeStationDownloadMyPokemonResult contains the same data as the current GlobalTradeStationDownloadMyPokemonResult
func (gtsdmpr GlobalTradeStationDownloadMyPokemonResult) Equals(o types.RVType) bool {
if _, ok := o.(*GlobalTradeStationDownloadMyPokemonResult); !ok {
if _, ok := o.(GlobalTradeStationDownloadMyPokemonResult); !ok {
return false
}

other := o.(*GlobalTradeStationDownloadMyPokemonResult)
other := o.(GlobalTradeStationDownloadMyPokemonResult)

if gtsdmpr.StructureVersion != other.StructureVersion {
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ func (gtsdopp GlobalTradeStationDownloadOtherPokemonParam) Copy() types.RVType {

// Equals checks if the given GlobalTradeStationDownloadOtherPokemonParam contains the same data as the current GlobalTradeStationDownloadOtherPokemonParam
func (gtsdopp GlobalTradeStationDownloadOtherPokemonParam) Equals(o types.RVType) bool {
if _, ok := o.(*GlobalTradeStationDownloadOtherPokemonParam); !ok {
if _, ok := o.(GlobalTradeStationDownloadOtherPokemonParam); !ok {
return false
}

other := o.(*GlobalTradeStationDownloadOtherPokemonParam)
other := o.(GlobalTradeStationDownloadOtherPokemonParam)

if gtsdopp.StructureVersion != other.StructureVersion {
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ func (gtsdpr GlobalTradeStationDownloadPokemonResult) Copy() types.RVType {

// Equals checks if the given GlobalTradeStationDownloadPokemonResult contains the same data as the current GlobalTradeStationDownloadPokemonResult
func (gtsdpr GlobalTradeStationDownloadPokemonResult) Equals(o types.RVType) bool {
if _, ok := o.(*GlobalTradeStationDownloadPokemonResult); !ok {
if _, ok := o.(GlobalTradeStationDownloadPokemonResult); !ok {
return false
}

other := o.(*GlobalTradeStationDownloadPokemonResult)
other := o.(GlobalTradeStationDownloadPokemonResult)

if gtsdpr.StructureVersion != other.StructureVersion {
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ func (gtsptpp GlobalTradeStationPrepareTradePokemonParam) Copy() types.RVType {

// Equals checks if the given GlobalTradeStationPrepareTradePokemonParam contains the same data as the current GlobalTradeStationPrepareTradePokemonParam
func (gtsptpp GlobalTradeStationPrepareTradePokemonParam) Equals(o types.RVType) bool {
if _, ok := o.(*GlobalTradeStationPrepareTradePokemonParam); !ok {
if _, ok := o.(GlobalTradeStationPrepareTradePokemonParam); !ok {
return false
}

other := o.(*GlobalTradeStationPrepareTradePokemonParam)
other := o.(GlobalTradeStationPrepareTradePokemonParam)

if gtsptpp.StructureVersion != other.StructureVersion {
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ func (gtsptpr GlobalTradeStationPrepareTradePokemonResult) Copy() types.RVType {

// Equals checks if the given GlobalTradeStationPrepareTradePokemonResult contains the same data as the current GlobalTradeStationPrepareTradePokemonResult
func (gtsptpr GlobalTradeStationPrepareTradePokemonResult) Equals(o types.RVType) bool {
if _, ok := o.(*GlobalTradeStationPrepareTradePokemonResult); !ok {
if _, ok := o.(GlobalTradeStationPrepareTradePokemonResult); !ok {
return false
}

other := o.(*GlobalTradeStationPrepareTradePokemonResult)
other := o.(GlobalTradeStationPrepareTradePokemonResult)

if gtsptpr.StructureVersion != other.StructureVersion {
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ func (gtsrk GlobalTradeStationRecordKey) Copy() types.RVType {

// Equals checks if the given GlobalTradeStationRecordKey contains the same data as the current GlobalTradeStationRecordKey
func (gtsrk GlobalTradeStationRecordKey) Equals(o types.RVType) bool {
if _, ok := o.(*GlobalTradeStationRecordKey); !ok {
if _, ok := o.(GlobalTradeStationRecordKey); !ok {
return false
}

other := o.(*GlobalTradeStationRecordKey)
other := o.(GlobalTradeStationRecordKey)

if gtsrk.StructureVersion != other.StructureVersion {
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ func (gtsspp GlobalTradeStationSearchPokemonParam) Copy() types.RVType {

// Equals checks if the given GlobalTradeStationSearchPokemonParam contains the same data as the current GlobalTradeStationSearchPokemonParam
func (gtsspp GlobalTradeStationSearchPokemonParam) Equals(o types.RVType) bool {
if _, ok := o.(*GlobalTradeStationSearchPokemonParam); !ok {
if _, ok := o.(GlobalTradeStationSearchPokemonParam); !ok {
return false
}

other := o.(*GlobalTradeStationSearchPokemonParam)
other := o.(GlobalTradeStationSearchPokemonParam)

if gtsspp.StructureVersion != other.StructureVersion {
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ func (gtsspr GlobalTradeStationSearchPokemonResult) Copy() types.RVType {

// Equals checks if the given GlobalTradeStationSearchPokemonResult contains the same data as the current GlobalTradeStationSearchPokemonResult
func (gtsspr GlobalTradeStationSearchPokemonResult) Equals(o types.RVType) bool {
if _, ok := o.(*GlobalTradeStationSearchPokemonResult); !ok {
if _, ok := o.(GlobalTradeStationSearchPokemonResult); !ok {
return false
}

other := o.(*GlobalTradeStationSearchPokemonResult)
other := o.(GlobalTradeStationSearchPokemonResult)

if gtsspr.StructureVersion != other.StructureVersion {
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ func (gtstk GlobalTradeStationTradeKey) Copy() types.RVType {

// Equals checks if the given GlobalTradeStationTradeKey contains the same data as the current GlobalTradeStationTradeKey
func (gtstk GlobalTradeStationTradeKey) Equals(o types.RVType) bool {
if _, ok := o.(*GlobalTradeStationTradeKey); !ok {
if _, ok := o.(GlobalTradeStationTradeKey); !ok {
return false
}

other := o.(*GlobalTradeStationTradeKey)
other := o.(GlobalTradeStationTradeKey)

if gtstk.StructureVersion != other.StructureVersion {
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ func (gtstpp GlobalTradeStationTradePokemonParam) Copy() types.RVType {

// Equals checks if the given GlobalTradeStationTradePokemonParam contains the same data as the current GlobalTradeStationTradePokemonParam
func (gtstpp GlobalTradeStationTradePokemonParam) Equals(o types.RVType) bool {
if _, ok := o.(*GlobalTradeStationTradePokemonParam); !ok {
if _, ok := o.(GlobalTradeStationTradePokemonParam); !ok {
return false
}

other := o.(*GlobalTradeStationTradePokemonParam)
other := o.(GlobalTradeStationTradePokemonParam)

if gtstpp.StructureVersion != other.StructureVersion {
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ func (gtstpr GlobalTradeStationTradePokemonResult) Copy() types.RVType {

// Equals checks if the given GlobalTradeStationTradePokemonResult contains the same data as the current GlobalTradeStationTradePokemonResult
func (gtstpr GlobalTradeStationTradePokemonResult) Equals(o types.RVType) bool {
if _, ok := o.(*GlobalTradeStationTradePokemonResult); !ok {
if _, ok := o.(GlobalTradeStationTradePokemonResult); !ok {
return false
}

other := o.(*GlobalTradeStationTradePokemonResult)
other := o.(GlobalTradeStationTradePokemonResult)

if gtstpr.StructureVersion != other.StructureVersion {
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ func (gtsupp GlobalTradeStationUploadPokemonParam) Copy() types.RVType {

// Equals checks if the given GlobalTradeStationUploadPokemonParam contains the same data as the current GlobalTradeStationUploadPokemonParam
func (gtsupp GlobalTradeStationUploadPokemonParam) Equals(o types.RVType) bool {
if _, ok := o.(*GlobalTradeStationUploadPokemonParam); !ok {
if _, ok := o.(GlobalTradeStationUploadPokemonParam); !ok {
return false
}

other := o.(*GlobalTradeStationUploadPokemonParam)
other := o.(GlobalTradeStationUploadPokemonParam)

if gtsupp.StructureVersion != other.StructureVersion {
return false
Expand Down
4 changes: 2 additions & 2 deletions datastore/pokemon-gen6/types/global_trade_station_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ func (gtsd GlobalTradeStationData) Copy() types.RVType {

// Equals checks if the given GlobalTradeStationData contains the same data as the current GlobalTradeStationData
func (gtsd GlobalTradeStationData) Equals(o types.RVType) bool {
if _, ok := o.(*GlobalTradeStationData); !ok {
if _, ok := o.(GlobalTradeStationData); !ok {
return false
}

other := o.(*GlobalTradeStationData)
other := o.(GlobalTradeStationData)

if gtsd.StructureVersion != other.StructureVersion {
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ func (gtsdpp GlobalTradeStationDeletePokemonParam) Copy() types.RVType {

// Equals checks if the given GlobalTradeStationDeletePokemonParam contains the same data as the current GlobalTradeStationDeletePokemonParam
func (gtsdpp GlobalTradeStationDeletePokemonParam) Equals(o types.RVType) bool {
if _, ok := o.(*GlobalTradeStationDeletePokemonParam); !ok {
if _, ok := o.(GlobalTradeStationDeletePokemonParam); !ok {
return false
}

other := o.(*GlobalTradeStationDeletePokemonParam)
other := o.(GlobalTradeStationDeletePokemonParam)

if gtsdpp.StructureVersion != other.StructureVersion {
return false
Expand Down
Loading

0 comments on commit 3a010e1

Please sign in to comment.