Browse Source

Added hashing for operator access.

Brucey 5 years ago
parent
commit
2556758fcc
1 changed files with 2 additions and 0 deletions
  1. 2 0
      map.mod/stringmap.bmx

+ 2 - 0
map.mod/stringmap.bmx

@@ -157,6 +157,7 @@ Type TStringMap
 	about: If the map does not contain @key, a #Null object is returned.
 	about: If the map does not contain @key, a #Null object is returned.
 	End Rem
 	End Rem
 	Method Operator[]:Object(key:String)
 	Method Operator[]:Object(key:String)
+		key.Hash()
 		Return bmx_map_stringmap_valueforkey(key, Varptr _root)
 		Return bmx_map_stringmap_valueforkey(key, Varptr _root)
 	End Method
 	End Method
 	
 	
@@ -165,6 +166,7 @@ Type TStringMap
 	about: If the map already contains @key, its value is overwritten with @value. 
 	about: If the map already contains @key, its value is overwritten with @value. 
 	End Rem
 	End Rem
 	Method Operator[]=(key:String, value:Object)
 	Method Operator[]=(key:String, value:Object)
+		key.Hash()
 		bmx_map_stringmap_insert(key, value, Varptr _root)
 		bmx_map_stringmap_insert(key, value, Varptr _root)
 	End Method
 	End Method