Use common helper functions for getting sorted map keys.

Add a new helper SortedIntKeys similar to SortedStringKeys.

Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: I08a43ec2cae7d1a82531295aca1a0658e3a0dd6f
This commit is contained in:
Ulya Trafimovich
2020-08-20 11:33:12 +01:00
parent 9ce2221791
commit b8063c6a86
5 changed files with 17 additions and 24 deletions

View File

@@ -17,7 +17,6 @@ package dexpreopt
import (
"encoding/json"
"fmt"
"sort"
"strings"
"github.com/google/blueprint"
@@ -142,16 +141,6 @@ func (libPaths LibraryPaths) AddLibraryPaths(otherPaths LibraryPaths) {
}
}
// Return sorted names of the libraries in the map.
func (libPaths LibraryPaths) Names() []string {
keys := make([]string, 0, len(libPaths))
for k := range libPaths {
keys = append(keys, k)
}
sort.Strings(keys)
return keys
}
type ModuleConfig struct {
Name string
DexLocation string // dex location on device