move most old PIMap iterators to new
Documentation of PIVector, PIMap and PIMapIterator
This commit is contained in:
@@ -87,7 +87,8 @@ void makeClassInfo(PIFile & f, const PICodeParser::Entity * e) {
|
||||
f << "\tci->name = \"" << e->name << "\";\n";
|
||||
f << "\tci->has_name = " << (e->has_name ? "true" : "false") << ";\n";
|
||||
if (!e->meta.isEmpty()) {
|
||||
for (PICodeParser::MetaMap::const_iterator i = e->meta.begin(); i != e->meta.end(); ++i)
|
||||
auto i = e->meta.makeIterator();
|
||||
while (i.next())
|
||||
f << "\tci->meta[\"" << i.key() << "\"] = PIString::fromUTF8(\"" << i.value() << "\");\n";
|
||||
}
|
||||
f << "\t(*classesInfo)[ci->name] = ci;\n";
|
||||
@@ -176,14 +177,16 @@ void makeEnumInfo(PIFile & f, const PICodeParser::Enum * e) {
|
||||
f << "\t(*enumsInfo)[\"" << e->name << "\"] = ei;\n";
|
||||
f << "\tei->name = \"" << e->name << "\";\n";
|
||||
if (!e->meta.isEmpty()) {
|
||||
for (PICodeParser::MetaMap::const_iterator i = e->meta.begin(); i != e->meta.end(); ++i)
|
||||
auto i = e->meta.makeIterator();
|
||||
while (i.next())
|
||||
f << "\tei->meta[\"" << i.key() << "\"] = PIString::fromUTF8(\"" << i.value() << "\");\n";
|
||||
}
|
||||
}
|
||||
piForeachC (PICodeParser::EnumeratorInfo & m, e->members) {
|
||||
f << "\tei->members << PICodeInfo::EnumeratorInfo(\"" << m.name << "\", " << m.value << ");\n";
|
||||
if (!m.meta.isEmpty()) {
|
||||
for (PICodeParser::MetaMap::const_iterator i = m.meta.begin(); i != m.meta.end(); ++i)
|
||||
auto i = m.meta.makeIterator();
|
||||
while (i.next())
|
||||
f << "\tei->members.back().meta[\"" << i.key() << "\"] = PIString::fromUTF8(\"" << i.value() << "\");\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -583,8 +583,9 @@ int main(int argc, char * argv[]) {
|
||||
qt_filters["platforms"] = platforms;
|
||||
qt_filters["styles" ] = styles ;
|
||||
|
||||
for (PIMap<PIString, PIStringList>::iterator it = qt_filters.begin(); it != qt_filters.end(); ++it)
|
||||
it.value().forEachInplace([](PIString i)->PIString{
|
||||
auto it = qt_filters.makeIterator();
|
||||
while (it.next())
|
||||
it.valueRef().forEachInplace([](PIString i)->PIString{
|
||||
if (!i.startsWith("*")) i.prepend("*");
|
||||
if (!i.endsWith("*")) i.append("*");
|
||||
return i;
|
||||
|
||||
Reference in New Issue
Block a user