MCPcopy Create free account
hub / github.com/google/gapid / MapIndex

Method MapIndex

gapil/semantic/api.go:149–156  ·  view source on GitHub ↗

MapIndex returns the index of the given map, or -1 if the map does not belong to the API.

(t *Map)

Source from the content-addressed store, hash-verified

147// MapIndex returns the index of the given map, or -1 if the map does not belong
148// to the API.
149func (a *API) MapIndex(t *Map) int {
150 for i, m := range a.Maps {
151 if m == t {
152 return i
153 }
154 }
155 return -1
156}
157
158// SliceIndex returns the index of the given slice, or -1 if the slice does not
159// belong to the API.

Callers 10

compareValuesMethod · 0.45
reflectCopyFunction · 0.45
GetMethod · 0.45
LookupMethod · 0.45
ContainsMethod · 0.45
mapsEqualMethod · 0.45
compileSubscriptFunction · 0.45
buildObjectViewMethod · 0.45
rttiMethod · 0.45
buildMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected