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:
@@ -175,7 +175,7 @@ PIVector<PISystemInfo::MountInfo> PISystemInfo::mountInfo(bool ignore_cache) {
|
||||
}
|
||||
if (l_df.size_s() < 2) return ret;
|
||||
l_df.pop_front();
|
||||
piForeachC(PIString & s, l_df) {
|
||||
for (const auto & s: l_df) {
|
||||
PIStringList ml(s.replacedAll(" ", " ").split(" "));
|
||||
if (ml.size_s() < 2) continue;
|
||||
if (ml.front() == "none") continue;
|
||||
@@ -234,17 +234,10 @@ PIString PISystemInfo::machineKey() {
|
||||
PISystemInfo * si = instance();
|
||||
PIByteArray salt;
|
||||
PIString conf = confDir() + "/.pip_machine_salt";
|
||||
if (PIFile::isExists(conf)) {
|
||||
PIFile f(conf, PIIODevice::ReadOnly);
|
||||
f.open();
|
||||
salt = f.readAll();
|
||||
}
|
||||
if (PIFile::isExists(conf)) salt = PIFile::readAll(conf, false);
|
||||
if (salt.size_s() != SALT_SIZE) {
|
||||
salt = generateSalt();
|
||||
PIFile f(conf, PIIODevice::ReadWrite);
|
||||
f.open();
|
||||
f.clear();
|
||||
f.write(salt);
|
||||
PIFile::writeAll(conf, salt);
|
||||
}
|
||||
ret = si->OS_name + "_" + si->architecture + "_" + si->hostname + "_" + salt.toHex();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user