Author: lslezak Date: Fri Mar 6 14:30:41 2009 New Revision: 55970 URL: http://svn.opensuse.org/viewcvs/yast?rev=55970&view=rev Log: - use YCPMap::const_iterator instead of obsoleted YCPMapIterator class Modified: branches/tmp/lslezak/core/liby2dbus/src/DBusMsg.cc Modified: branches/tmp/lslezak/core/liby2dbus/src/DBusMsg.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/core/liby2dbus/src/DBusMsg.cc?rev=55970&r1=55969&r2=55970&view=diff ============================================================================== --- branches/tmp/lslezak/core/liby2dbus/src/DBusMsg.cc (original) +++ branches/tmp/lslezak/core/liby2dbus/src/DBusMsg.cc Fri Mar 6 14:30:41 2009 @@ -332,9 +332,9 @@ DBusMessageIter array_it; - YCPMapIterator mit = map.begin(); + YCPMap::const_iterator mit = map.begin(); // use string as fallback for empty map - std::string key_type(mit == map.end() ? DBUS_TYPE_STRING_AS_STRING : typeStr(mit.key())); + std::string key_type(mit == map.end() ? DBUS_TYPE_STRING_AS_STRING : typeStr(mit->first)); // dbus allows only basic types as key type in a map const std::string valid_key_types(DBUS_TYPE_INT64_AS_STRING DBUS_TYPE_DOUBLE_AS_STRING @@ -352,10 +352,10 @@ y2debug("Opening DICT container"); dbus_message_iter_open_container(i, DBUS_TYPE_ARRAY, map_signature.c_str(), &array_it); - for(YCPMapIterator mit = map.begin(); mit != map.end() ; ++mit) + for(YCPMap::const_iterator mit = map.begin(); mit != map.end() ; ++mit) { - YCPValue key = mit.key(); - YCPValue val = mit.value(); + YCPValue key = mit->first; + YCPValue val = mit->second; // error: this is a different key type than the announced type if (key_type != typeStr(key)) @@ -505,10 +505,10 @@ y2debug("Opening DICT container"); dbus_message_iter_open_container(i, DBUS_TYPE_ARRAY, "{(bsv)(bsv)}", &array_it); - for(YCPMapIterator mit = map.begin(); mit != map.end() ; ++mit) + for(YCPMap::const_iterator mit = map.begin(); mit != map.end() ; ++mit) { - YCPValue key = mit.key(); - YCPValue val = mit.value(); + YCPValue key = mit->first; + YCPValue val = mit->second; DBusMessageIter map_item_it; y2debug("Opening map item container"); @@ -1093,7 +1093,7 @@ YCPMap map = val->asMap(); // get key type, use string as a fallback for an empty map - std::string key_type((map.size() > 0) ? typeStr(map.begin().key()) : "s"); + std::string key_type((map.size() > 0) ? typeStr(map.begin()->first) : "s"); // key of the DBus DICT struct must be a basic type // see http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-sig... -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org