SGPropertyNode *templatetree = new SGPropertyNode();
try {
readProperties(templatefile.str().c_str(), templatetree);
- } catch (sg_io_exception e) {
+ } catch (sg_io_exception & e) {
cout << e.getFormattedMessage ();
}
PropertyList axes = templatetree->getChildren("axis");
- for(PropertyList::iterator iter = axes.begin(); iter != axes.end(); iter++) {
+ for(PropertyList::iterator iter = axes.begin(); iter != axes.end(); ++iter) {
cout << "Move the control you wish to use for " << (*iter)->getStringValue("desc")
<< " " << (*iter)->getStringValue("direction") << endl;
cout << "Pressing a button skips this axis" << endl;
->getDeadBand(jsi->getInputAxis()));
axis->setDoubleValue("binding/factor", jsi->getInputAxisPositive() ? 1.0 : -1.0);
} else {
- iter--;
+ --iter;
}
} else {
cout << "Skipping control" << endl;
if ( ! confirmAnswer() )
- iter--;
+ --iter;
}
cout << endl;
}
PropertyList buttons = templatetree->getChildren("button");
- for(PropertyList::iterator iter = buttons.begin(); iter != buttons.end(); iter++) {
+ for(PropertyList::iterator iter = buttons.begin(); iter != buttons.end(); ++iter) {
cout << "Press the button you wish to use for " << (*iter)->getStringValue("desc") << endl;
cout << "Moving a joystick axis skips this button" << endl;
fflush( stdout );
SGPropertyNode *button = jstree[ jsi->getInputJoystick() ]->getChild("button", jsi->getInputButton(), true);
copyProperties(*iter, button);
} else {
- iter--;
+ --iter;
}
} else {
cout << "Skipping control" << endl;
if (! confirmAnswer())
- iter--;
+ --iter;
}
cout << endl;
}
jstree[i]->setStringValue("name", jss->getJoystick(i)->getName());
writeProperties(xfs[i], jstree[i], true);
- } catch (sg_io_exception e) {
+ } catch (sg_io_exception & e) {
cout << e.getFormattedMessage ();
}
xfs[i].close();