Author: aschnell Date: Wed Jan 7 17:34:16 2009 New Revision: 54455 URL: http://svn.opensuse.org/viewcvs/yast?rev=54455&view=rev Log: - replace YCPMapIterator with YCPMap::const_iterator Modified: trunk/core/agent-system/src/SystemAgent.cc Modified: trunk/core/agent-system/src/SystemAgent.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/agent-system/src/SystemAgent.cc?rev=54455&r1=54454&r2=54455&view=diff ============================================================================== --- trunk/core/agent-system/src/SystemAgent.cc (original) +++ trunk/core/agent-system/src/SystemAgent.cc Wed Jan 7 17:34:16 2009 @@ -275,14 +275,14 @@ { YCPMap map = value->asMap (); ret += "$["; - for (YCPMapIterator i = map->begin (); i != map->end (); i++) { + for (YCPMap::const_iterator i = map->begin(); i != map->end(); i++) { if ( i != map->begin () ) ret += ","; ret += "\n"; ret += indent_output (level+1); - ret += dump_value (level+1, i.key ()); + ret += dump_value (level+1, i->first); ret += " : "; - ret += dump_value (level+1, i.value ()); + ret += dump_value (level+1, i->second); } ret += "\n"; ret += indent_output (level); @@ -946,17 +946,18 @@ } string exports = ""; - for (YCPMapIterator pos = variables->begin(); pos != variables->end(); ++pos) + for (YCPMap::const_iterator pos = variables->begin(); pos != variables->end(); ++pos) { - YCPValue key = pos.key(); - YCPValue value = pos.value(); + const YCPValue& key = pos->first; + const YCPValue& value = pos->second; + if (!key->isString()) { return YCPError (string("Invalid value '") + key->toString() + "' for target variable name, which must be a string"); - } + exports += "export " + key->asString()->value() + "='"; string valstr; if (value->isString()) -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org