Merge pull request #235 from asmundak/collapseduplicate

Export CollapseDuplicateProperties, Soong writedocs uses it
This commit is contained in:
asmundak 2019-02-17 16:36:43 -08:00 committed by GitHub
commit d444506bf6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -228,7 +228,7 @@ propertyStructLoop:
for _, from := range mt.PropertyStructs { for _, from := range mt.PropertyStructs {
for _, to := range collapsed { for _, to := range collapsed {
if from.Name == to.Name { if from.Name == to.Name {
collapseDuplicateProperties(&to.Properties, &from.Properties) CollapseDuplicateProperties(&to.Properties, &from.Properties)
continue propertyStructLoop continue propertyStructLoop
} }
} }
@ -237,13 +237,13 @@ propertyStructLoop:
mt.PropertyStructs = collapsed mt.PropertyStructs = collapsed
} }
func collapseDuplicateProperties(to, from *[]Property) { func CollapseDuplicateProperties(to, from *[]Property) {
propertyLoop: propertyLoop:
for _, f := range *from { for _, f := range *from {
for i := range *to { for i := range *to {
t := &(*to)[i] t := &(*to)[i]
if f.Name == t.Name { if f.Name == t.Name {
collapseDuplicateProperties(&t.Properties, &f.Properties) CollapseDuplicateProperties(&t.Properties, &f.Properties)
continue propertyLoop continue propertyLoop
} }
} }