move most old PIMap iterators to new

Documentation of PIVector, PIMap and PIMapIterator
This commit is contained in:
2020-08-03 01:43:23 +03:00
parent df457a1602
commit 427e7411c1
8 changed files with 280 additions and 70 deletions

View File

@@ -36,13 +36,12 @@ PIByteArray PIResources::get(const PIString & name) {
void PIResources::dump() {
PIMap<PIString, PIResourcesStorage::Section * > & sm(PIResourcesStorage::instance()->sections);
PIMap<PIString, PIResourcesStorage::Section * >::iterator si;
for (si = sm.begin(); si != sm.end(); ++si) {
auto si = PIResourcesStorage::instance()->sections.makeIterator();
while (si.next()) {
piCout << "Section [" << si.key() << "]";
if (!si.value()) continue;
PIMap<PIString, PIByteArray * >::iterator fi;
for (fi = si.value()->entries.begin(); fi != si.value()->entries.end(); ++fi) {
auto fi = si.value()->entries.makeIterator();
while (fi.next()) {
PIString s = fi.key() + ": ";
s << (fi.value() ? fi.value()->size_s() : 0) << " b";
piCout << " " << s;