ConfigType: store config objects in a hash map

refs #8112
This commit is contained in:
Alexander A. Klimov 2020-07-17 10:33:08 +02:00
parent 11e37a0bd1
commit 21759f015d
1 changed files with 2 additions and 1 deletions

View File

@ -8,6 +8,7 @@
#include "base/type.hpp"
#include "base/dictionary.hpp"
#include <mutex>
#include <unordered_map>
namespace icinga
{
@ -48,7 +49,7 @@ for (const auto& object : objects) {
int GetObjectCount() const;
private:
typedef std::map<String, intrusive_ptr<ConfigObject> > ObjectMap;
typedef std::unordered_map<String, intrusive_ptr<ConfigObject> > ObjectMap;
typedef std::vector<intrusive_ptr<ConfigObject> > ObjectVector;
mutable std::mutex m_Mutex;