Merge "Change bpdoc to separate entries with the same type" am: 0bf636f3ef
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1878636 Change-Id: Ie8f13a8b8d4bb12040a5f8d7ef00c11febf4859e
This commit is contained in:
commit
7224b3edcc
1 changed files with 0 additions and 26 deletions
|
@ -81,7 +81,6 @@ func AllPackages(pkgFiles map[string][]string, moduleTypeNameFactories map[strin
|
|||
removeEmptyPropertyStructs(mtInfo)
|
||||
collapseDuplicatePropertyStructs(mtInfo)
|
||||
collapseNestedPropertyStructs(mtInfo)
|
||||
combineDuplicateProperties(mtInfo)
|
||||
|
||||
// Add the ModuleInfo to the corresponding Package map/slice entries.
|
||||
pkg := pkgMap[mtInfo.PkgPath]
|
||||
|
@ -336,28 +335,3 @@ func collapseNestedProperties(p *[]Property) {
|
|||
}
|
||||
*p = n
|
||||
}
|
||||
|
||||
func combineDuplicateProperties(mt *ModuleType) {
|
||||
for _, ps := range mt.PropertyStructs {
|
||||
combineDuplicateSubProperties(&ps.Properties)
|
||||
}
|
||||
}
|
||||
|
||||
func combineDuplicateSubProperties(p *[]Property) {
|
||||
var n []Property
|
||||
propertyLoop:
|
||||
for _, child := range *p {
|
||||
if len(child.Properties) > 0 {
|
||||
combineDuplicateSubProperties(&child.Properties)
|
||||
for i := range n {
|
||||
s := &n[i]
|
||||
if s.SameSubProperties(child) {
|
||||
s.OtherNames = append(s.OtherNames, child.Name)
|
||||
continue propertyLoop
|
||||
}
|
||||
}
|
||||
}
|
||||
n = append(n, child)
|
||||
}
|
||||
*p = n
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue