Added at() method to orderedmap.

This commit is contained in:
Joakim Hove
2018-03-18 19:24:48 +01:00
parent e63283093c
commit 0dbabc19ca
2 changed files with 20 additions and 2 deletions

View File

@@ -91,6 +91,22 @@ public:
return m_vector[index];
}
const T& at(size_t index) const {
return this->get(index);
}
const T& at(const std::string &key) const {
return this->get(key);
}
T& at(size_t index) {
return this->get(index);
}
T& at(const std::string& key) {
return this->get(key);
}
T* getPtr(const std::string& key) const {
auto iter = m_map.find( key );