Fix linkedhashmap

This commit is contained in:
世界 2023-03-18 17:46:14 +08:00
parent 18cd006d26
commit 4bbf5f2c30
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -36,7 +36,11 @@ func (m *Map[K, V]) ContainsKey(key K) bool {
func (m *Map[K, V]) Get(key K) (V, bool) {
m.init()
value, loaded := m.rawMap[key]
return value.Value.Value, loaded
if loaded {
return value.Value.Value, true
} else {
return common.DefaultValue[V](), false
}
}
func (m *Map[K, V]) Put(key K, value V) V {