Merge "Remove unused key field from SdkMemberTypesRegistry" am: 45de13f93d

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1808896

Change-Id: Id0b3dcd603eaea18b714902b6d4878c8adfd8de1
This commit is contained in:
Paul Duffin 2021-08-31 16:12:11 +00:00 committed by Automerger Merge Worker
commit 0c9985dc6d

View file

@ -570,9 +570,6 @@ func (b *SdkMemberTypeBase) UsesSourceModuleTypeInSnapshot() bool {
type SdkMemberTypesRegistry struct {
// The list of types sorted by property name.
list []SdkMemberType
// The key that uniquely identifies this registry instance.
key OnceKey
}
func (r *SdkMemberTypesRegistry) copyAndAppend(memberType SdkMemberType) *SdkMemberTypesRegistry {
@ -592,18 +589,9 @@ func (r *SdkMemberTypesRegistry) copyAndAppend(memberType SdkMemberType) *SdkMem
return t1.SdkPropertyName() < t2.SdkPropertyName()
})
// Generate a key that identifies the slice of SdkMemberTypes by joining the property names
// from all the SdkMemberType .
var properties []string
for _, t := range list {
properties = append(properties, t.SdkPropertyName())
}
key := NewOnceKey(strings.Join(properties, "|"))
// Create a new registry so the pointer uniquely identifies the set of registered types.
return &SdkMemberTypesRegistry{
list: list,
key: key,
}
}