@@ -257,8 +257,15 @@ auto any::extractValue(const any& a) -> const any& {
257257auto any::operator[](const char rhs[]) const -> const any& {
258258 const any& val = extractValue(*this);
259259 assert(val.type == Type::Map);
260− for (any::map::const_iterator it = val.m->begin(), end = val.m->end(); it != end; ++it) {
261− if (it->first == rhs || strcmp(it->first, rhs) == 0) {
260+ const any::map::const_iterator begin = val.m->begin();
261+ const any::map::const_iterator end = val.m->end();
262+ for (any::map::const_iterator it = begin; it != end; ++it) {
263+ if (it->first == rhs) {
264+ return it->second;
265+ }
266+ }
267+ for (any::map::const_iterator it = begin; it != end; ++it) {
268+ if (strcmp(it->first, rhs) == 0) {
262269 return it->second;
263270 }
264271 }