{
InterpEntry *pom = NULL;
- for (int i = 0; i < Interpreters.size(); i++) {
- if (Interpreters.at(i)->sock == _id) {
- pom = Interpreters.at(i);
+ for (auto interpreter : Interpreters) {
+ if (interpreter->sock == _id) {
+ pom = interpreter;
break;
}
}
{
InterpEntry *pom = NULL;
- for (int i = 0; i < Interpreters.size(); i++) {
- if (Interpreters.at(i)->ID == _id) {
- pom = Interpreters.at(i);
+ for (auto interpreter : Interpreters) {
+ if (interpreter->ID == _id) {
+ pom = interpreter;
break;
}
}
break;
}
- std::vector<std::string> hosts = config.getHosts();
- for (unsigned int i = 0; i < hosts.size(); i++) {
- connections->addItem(hosts[i].c_str());
+ for (auto host : config.getHosts()) {
+ connections->addItem(host.c_str());
}
programsDirectory->setText(config.getProgramDir());
QLabel *tmpQLabel;
QPushButton *addbtn, *delbtn, *okbtn, *cancelbtn;
VLPEntry *pom;
- int i, j;
+ int i;
char pomstr[255];
//dlg.setStyle(WindowsStyle);
while (nodesIterator.hasNext()) {
pom = nodesIterator.next();
- j = Nodes.indexOf(pom);
+ i = Nodes.indexOf(pom);
sprintf(pomstr, "%s.cfg", pom->addr);
config_t cfg;
}
config_setting_set_string(setting, "explicit");
}
- for (i = 0; i < Nodes.count(); i++) {
- if (pom != Nodes.at(i)) {
+ for (auto node : Nodes) {
+ if (pom != node) {
setting = config_setting_get_member(root, "host");
if (!setting) {
setting = config_setting_add(root, "host", CONFIG_TYPE_STRING);
}
- config_setting_set_string(setting, Nodes.at(i)->addr);
+ config_setting_set_string(setting, node->addr);
}
}
}
config_destroy(&cfg);
- pom = Nodes.at(j);
+ pom = Nodes.at(i);
}
}
}