overrides: Simplify index creation

This commit is contained in:
Danny Lin 2021-11-10 15:32:57 -08:00
parent cee15e1fcd
commit ad625abac3

View file

@ -22,12 +22,7 @@ export function parseOverrides(list: string) {
export function findOverrideModules(overridePaths: Iterable<string>, modulesMap: SoongModuleInfo) {
// Build installed path->module index
let pathMap = new Map<string, TargetModuleInfo>()
for (let moduleName in modulesMap) {
if (!modulesMap.hasOwnProperty(moduleName)) {
continue
}
let module = modulesMap[moduleName]
for (let module of Object.values(modulesMap)) {
for (let path of module.installed) {
pathMap.set(path, module)
}