mapex空内容查找core

This commit is contained in:
duanhf2012
2020-02-17 17:23:15 +08:00
parent 0a3e845d83
commit af9c518806

View File

@@ -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