- code cleanup based on cppcheck report
This commit is contained in:
parent
83d2474ded
commit
2ab041813f
|
@ -677,41 +677,23 @@ string ScriptManager::wrapString(const string &str, int wrapCount){
|
|||
void ScriptManager::networkShowMessageForFaction(const string &text, const string &header,int factionIndex) {
|
||||
ScriptManager_STREFLOP_Wrapper streflopWrapper;
|
||||
|
||||
Lang &lang= Lang::getInstance();
|
||||
messageQueue.push_back(ScriptManagerMessage(text, header, factionIndex));
|
||||
onMessageBoxOk(false);
|
||||
// if(factionIndex == this->world->getThisFactionIndex()) {
|
||||
// messageBox.setEnabled(true);
|
||||
// messageBox.setText(wrapString(lang.getScenarioString(messageQueue.front().getText()), messageWrapCount));
|
||||
// messageBox.setHeader(lang.getScenarioString(messageQueue.front().getHeader()));
|
||||
// }
|
||||
}
|
||||
void ScriptManager::networkShowMessageForTeam(const string &text, const string &header,int teamIndex) {
|
||||
ScriptManager_STREFLOP_Wrapper streflopWrapper;
|
||||
|
||||
Lang &lang= Lang::getInstance();
|
||||
|
||||
// Team indexes are 0 based internally (but 1 based in the lua script) so convert
|
||||
teamIndex--;
|
||||
messageQueue.push_back(ScriptManagerMessage(text, header, -1, teamIndex));
|
||||
onMessageBoxOk(false);
|
||||
// if(teamIndex == this->world->getThisTeamIndex()) {
|
||||
// messageBox.setEnabled(true);
|
||||
// messageBox.setText(wrapString(lang.getScenarioString(messageQueue.front().getText()), messageWrapCount));
|
||||
// messageBox.setHeader(lang.getScenarioString(messageQueue.front().getHeader()));
|
||||
// }
|
||||
}
|
||||
|
||||
void ScriptManager::showMessage(const string &text, const string &header){
|
||||
ScriptManager_STREFLOP_Wrapper streflopWrapper;
|
||||
|
||||
Lang &lang= Lang::getInstance();
|
||||
|
||||
messageQueue.push_back(ScriptManagerMessage(text, header));
|
||||
onMessageBoxOk(false);
|
||||
// messageBox.setEnabled(true);
|
||||
// messageBox.setText(wrapString(lang.getScenarioString(messageQueue.front().getText()), messageWrapCount));
|
||||
// messageBox.setHeader(lang.getScenarioString(messageQueue.front().getHeader()));
|
||||
}
|
||||
|
||||
void ScriptManager::clearDisplayText(){
|
||||
|
|
|
@ -1176,7 +1176,6 @@ bool Gui::computeTarget(const Vec2i &screenPos, Vec2i &targetPos, const Unit *&t
|
|||
else{
|
||||
targetUnit= NULL;
|
||||
if(renderer.computePosition(screenPos, targetPos)){
|
||||
const Object* resourceObject;
|
||||
validPosObjWorld= true;
|
||||
posObjWorld= targetPos;
|
||||
|
||||
|
|
|
@ -2434,10 +2434,8 @@ void runTilesetValidationReport(int argc, char** argv) {
|
|||
//disableBacktrace=true;
|
||||
printf("====== Started Validation ======\n");
|
||||
|
||||
bool purgeDuplicateFiles = false;
|
||||
bool showDuplicateFiles = true;
|
||||
bool purgeUnusedFiles = false;
|
||||
bool svnPurgeFiles = false;
|
||||
|
||||
double purgedMegaBytes=0;
|
||||
Config &config = Config::getInstance();
|
||||
|
|
|
@ -38,6 +38,7 @@ ResourceType::ResourceType() {
|
|||
defResPerPatch=0;
|
||||
recoup_cost = false;
|
||||
model = NULL;
|
||||
displayInHud = false;
|
||||
}
|
||||
|
||||
ResourceType::~ResourceType(){
|
||||
|
|
Loading…
Reference in New Issue