@@ -257,8 +257,15 @@ auto any::extractValue(const any& a) -> const any& {
257auto any::operator[](const char rhs[]) const -> const any& {
257auto any::operator[](const char rhs[]) const -> const any& {
258 const any& val = extractValue(*this);
258 const any& val = extractValue(*this);
259 assert(val.type == Type::Map);
259 assert(val.type == Type::Map);
260− for (any::map::const_iterator it = val.m->begin(), end = val.m->end(); it != end; ++it) {
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) {
267+ for (any::map::const_iterator it = begin; it != end; ++it) {
261− if (it->first == rhs || strcmp(it->first, rhs) == 0) {
268+ if (strcmp(it->first, rhs) == 0) {
262 return it->second;
269 return it->second;