mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-04 06:54:45 +08:00
mapex空内容查找core
This commit is contained in:
@@ -49,6 +49,9 @@ func (m *MapEx) GetHashCode(key interface{}) int {
|
||||
}
|
||||
|
||||
func (m *MapEx) GetArrayIdByKey(key interface{}) int {
|
||||
if m.hashMapNum ==0 {
|
||||
return -1
|
||||
}
|
||||
idx := m.GetHashCode(key) % m.hashMapNum
|
||||
if idx > m.hashMapNum {
|
||||
return -1
|
||||
|
||||
Reference in New Issue
Block a user