Use unordered_map instead of map

This commit is contained in:
Sebastian Messmer 2015-04-17 17:39:07 +02:00
parent d15a355464
commit 5e753ae706

View File

@ -4,6 +4,7 @@
#include <mutex> #include <mutex>
#include <memory> #include <memory>
#include <map> #include <map>
#include <unordered_map>
#include <future> #include <future>
#include <cassert> #include <cassert>
#include <type_traits> #include <type_traits>
@ -71,7 +72,7 @@ private:
std::mutex _mutex; std::mutex _mutex;
std::unique_ptr<ParallelAccessBaseStore<Resource, Key>> _baseStore; std::unique_ptr<ParallelAccessBaseStore<Resource, Key>> _baseStore;
std::map<Key, OpenResource> _openResources; std::unordered_map<Key, OpenResource> _openResources;
std::map<Key, std::promise<std::unique_ptr<Resource>>> _resourcesToRemove; std::map<Key, std::promise<std::unique_ptr<Resource>>> _resourcesToRemove;
std::unique_ptr<ResourceRef> _add(const Key &key, std::unique_ptr<Resource> resource); std::unique_ptr<ResourceRef> _add(const Key &key, std::unique_ptr<Resource> resource);