| ... | ... | @@ -1086,6 +1086,14 @@ pub fn IndexedMap(comptime I: type, comptime V: type, comptime Ext: ?fn (type) t |
| 1086 | 1086 | return &self.values[index]; |
| 1087 | 1087 | } |
| 1088 | 1088 | |
| 1089 | /// Gets the address of the const value associated with a key. |
| 1090 | /// The key must be present in the map. |
| 1091 | pub fn getPtrConstAssertContains(self: *const Self, key: Key) *const Value { |
| 1092 | const index = Indexer.indexOf(key); |
| 1093 | assert(self.bits.isSet(index)); |
| 1094 | return &self.values[index]; |
| 1095 | } |
| 1096 | |
| 1089 | 1097 | /// Adds the key to the map with the supplied value. |
| 1090 | 1098 | /// If the key is already in the map, overwrites the value. |
| 1091 | 1099 | pub fn put(self: *Self, key: Key, value: Value) void { |