Merge "Use android.InList for inList"

This commit is contained in:
Treehugger Robot
2018-02-22 03:22:43 +00:00
committed by Gerrit Code Review
2 changed files with 3 additions and 23 deletions

View File

@@ -199,20 +199,6 @@ func addPrefix(list []string, prefix string) []string {
return list return list
} }
func indexList(s string, list []string) int {
for i, l := range list {
if l == s {
return i
}
}
return -1
}
func inList(s string, list []string) bool {
return indexList(s, list) != -1
}
func SanitizerRuntimeLibrary(t Toolchain, sanitizer string) string { func SanitizerRuntimeLibrary(t Toolchain, sanitizer string) string {
arch := t.SanitizerRuntimeLibraryArch() arch := t.SanitizerRuntimeLibraryArch()
if arch == "" { if arch == "" {
@@ -243,3 +229,5 @@ func ToolPath(t Toolchain) string {
} }
return filepath.Join(t.GccRoot(), t.GccTriple(), "bin") return filepath.Join(t.GccRoot(), t.GccTriple(), "bin")
} }
var inList = android.InList

View File

@@ -1252,15 +1252,6 @@ func ImportFactoryHost() android.Module {
return module return module
} }
func inList(s string, l []string) bool {
for _, e := range l {
if e == s {
return true
}
}
return false
}
// //
// Defaults // Defaults
// //
@@ -1295,3 +1286,4 @@ func DefaultsFactory(props ...interface{}) android.Module {
var Bool = proptools.Bool var Bool = proptools.Bool
var String = proptools.String var String = proptools.String
var inList = android.InList