mirror of
https://github.com/glest/glest-source.git
synced 2025-08-28 02:09:54 +02:00
problems found by coverity
This commit is contained in:
@@ -2441,7 +2441,9 @@ void MenuStateCustomGame::update() {
|
|||||||
if(this->autoloadScenarioName != "") {
|
if(this->autoloadScenarioName != "") {
|
||||||
listBoxScenario.setSelectedItem(formatString(this->autoloadScenarioName),false);
|
listBoxScenario.setSelectedItem(formatString(this->autoloadScenarioName),false);
|
||||||
lastSetChangedGameSettings = time(NULL);
|
lastSetChangedGameSettings = time(NULL);
|
||||||
lastGameSettingsreceivedCount=serverInterface->getGameSettingsUpdateCount();
|
if(serverInterface != NULL){
|
||||||
|
lastGameSettingsreceivedCount=serverInterface->getGameSettingsUpdateCount();
|
||||||
|
}
|
||||||
if(listBoxScenario.getSelectedItem() != formatString(this->autoloadScenarioName)) {
|
if(listBoxScenario.getSelectedItem() != formatString(this->autoloadScenarioName)) {
|
||||||
mainMessageBoxState=1;
|
mainMessageBoxState=1;
|
||||||
showMessageBox( "Could not find scenario name: " + formatString(this->autoloadScenarioName), "Scenario Missing", false);
|
showMessageBox( "Could not find scenario name: " + formatString(this->autoloadScenarioName), "Scenario Missing", false);
|
||||||
|
@@ -705,15 +705,15 @@ XmlNode::XmlNode(xml_node<> *node, const std::map<string,string> &mapTagReplacem
|
|||||||
if(node->type() == node_element && children.size() == 0) {
|
if(node->type() == node_element && children.size() == 0) {
|
||||||
string xmlText = node->value();
|
string xmlText = node->value();
|
||||||
|
|
||||||
bool debugReplace = false;
|
// bool debugReplace = false;
|
||||||
// if(xmlText.find("{SCENARIOPATH}") != string::npos) {
|
// if(xmlText.find("{SCENARIOPATH}") != string::npos) {
|
||||||
// printf("\n----------------------\n** XML!! WILL REPLACE [%s]\n",xmlText.c_str());
|
// printf("\n----------------------\n** XML!! WILL REPLACE [%s]\n",xmlText.c_str());
|
||||||
// debugReplace = true;
|
// debugReplace = true;
|
||||||
// }
|
// }
|
||||||
Properties::applyTagsToValue(xmlText,&mapTagReplacementValues, skipUpdatePathClimbingParts);
|
Properties::applyTagsToValue(xmlText,&mapTagReplacementValues, skipUpdatePathClimbingParts);
|
||||||
if(debugReplace) {
|
// if(debugReplace) {
|
||||||
printf("\n\n** XML!! REPLACED WITH [%s]\n===================\n",xmlText.c_str());
|
// printf("\n\n** XML!! REPLACED WITH [%s]\n===================\n",xmlText.c_str());
|
||||||
}
|
// }
|
||||||
text = xmlText;
|
text = xmlText;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user