|
|
@ -444,6 +444,17 @@ namespace arx {
|
|
|
|
return this->end();
|
|
|
|
return this->end();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
iterator find(const Key& key)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
for (size_t i = 0; i < this->size(); ++i)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
iterator it = this->begin() + i;
|
|
|
|
|
|
|
|
if (key == it->first)
|
|
|
|
|
|
|
|
return it;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return this->end();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pair<iterator, bool> insert(const Key& key, const T& t)
|
|
|
|
pair<iterator, bool> insert(const Key& key, const T& t)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bool b {false};
|
|
|
|
bool b {false};
|
|
|
@ -516,9 +527,9 @@ namespace arx {
|
|
|
|
return this->end();
|
|
|
|
return this->end();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const T& operator[] (const Key& key)
|
|
|
|
T& operator[] (const Key& key)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const_iterator it = find(key);
|
|
|
|
iterator it = find(key);
|
|
|
|
if (it != this->end()) return it->second;
|
|
|
|
if (it != this->end()) return it->second;
|
|
|
|
|
|
|
|
|
|
|
|
insert(::arx::make_pair(key, T()));
|
|
|
|
insert(::arx::make_pair(key, T()));
|
|
|
|