Files
Steve Jenson 5b93613322 Adds a OrderMap::drain() method
Problem:
Porting some code that used HashMap's drain to OrderMap revealed a small
API gap.

Solution:
Added a drain method, mirroring std::collection::HashMap's drain method.

drain() provides an efficient way to remove all values without shrinking
the capacity of the original OrderMap.

Validation:
Added unit tests and ported an existing HashMap::drain() user to
OrderMap::drain
2017-04-20 13:21:57 -07:00

3 lines
18 B
Plaintext