Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d0ba59e authored by Colin Cross's avatar Colin Cross
Browse files

Use android.InList for inList

Remove duplicate implementations of inList.

Test: m checkbuild
Change-Id: I6943b95f6d47e6722b9ff1ab61ab14c429fe33a0
parent 52226ad9
Loading
Loading
Loading
Loading
+2 −14
Original line number Diff line number Diff line
@@ -199,20 +199,6 @@ func addPrefix(list []string, prefix string) []string {
	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 {
	arch := t.SanitizerRuntimeLibraryArch()
	if arch == "" {
@@ -243,3 +229,5 @@ func ToolPath(t Toolchain) string {
	}
	return filepath.Join(t.GccRoot(), t.GccTriple(), "bin")
}

var inList = android.InList
+1 −9
Original line number Diff line number Diff line
@@ -1252,15 +1252,6 @@ func ImportFactoryHost() android.Module {
	return module
}

func inList(s string, l []string) bool {
	for _, e := range l {
		if e == s {
			return true
		}
	}
	return false
}

//
// Defaults
//
@@ -1295,3 +1286,4 @@ func DefaultsFactory(props ...interface{}) android.Module {

var Bool = proptools.Bool
var String = proptools.String
var inList = android.InList