get rid of piForeach

apply some code analyzer recommendations
ICU flag now check if libicu exists
prepare for more accurate growth of containers (limited PoT, then constantly increase size)
This commit is contained in:
2024-11-20 20:01:47 +03:00
parent 24112498ce
commit caa7880cc4
40 changed files with 415 additions and 320 deletions

View File

@@ -130,7 +130,7 @@ void removeFiles(const PIDir & dir, PIStringList l) {
l.removeAll("..");
PIString ap = dir.absolutePath();
// piCout << "remove from" << ap;
piForeachC(PIString & s, l) {
for (const auto & s: l) {
PIFile::FileInfo fi = PIFile::fileInfo(ap + PIDir::separator + s);
if (fi.isDir()) {
PIVector<PIFile::FileInfo> el = PIDir::allEntries(fi.path);
@@ -149,7 +149,7 @@ bool cryptFiles(const PIDir & dir, PIStringList l, const PIByteArray & secret) {
if (secret.size() != PICrypt::sizeKey() || secret.isEmpty()) return false;
l.removeAll("..");
PIString ap = dir.absolutePath();
piForeachC(PIString & s, l) {
for (const auto & s: l) {
PIFile::FileInfo fi = PIFile::fileInfo(ap + PIDir::separator + s);
if (fi.isDir()) {
PIVector<PIFile::FileInfo> el = PIDir::allEntries(fi.path);