mirror of
https://github.com/glest/glest-source.git
synced 2025-10-03 19:01:53 +02:00
- code cleanup based on cppcheck report
This commit is contained in:
@@ -677,41 +677,23 @@ string ScriptManager::wrapString(const string &str, int wrapCount){
|
|||||||
void ScriptManager::networkShowMessageForFaction(const string &text, const string &header,int factionIndex) {
|
void ScriptManager::networkShowMessageForFaction(const string &text, const string &header,int factionIndex) {
|
||||||
ScriptManager_STREFLOP_Wrapper streflopWrapper;
|
ScriptManager_STREFLOP_Wrapper streflopWrapper;
|
||||||
|
|
||||||
Lang &lang= Lang::getInstance();
|
|
||||||
messageQueue.push_back(ScriptManagerMessage(text, header, factionIndex));
|
messageQueue.push_back(ScriptManagerMessage(text, header, factionIndex));
|
||||||
onMessageBoxOk(false);
|
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) {
|
void ScriptManager::networkShowMessageForTeam(const string &text, const string &header,int teamIndex) {
|
||||||
ScriptManager_STREFLOP_Wrapper streflopWrapper;
|
ScriptManager_STREFLOP_Wrapper streflopWrapper;
|
||||||
|
|
||||||
Lang &lang= Lang::getInstance();
|
|
||||||
|
|
||||||
// Team indexes are 0 based internally (but 1 based in the lua script) so convert
|
// Team indexes are 0 based internally (but 1 based in the lua script) so convert
|
||||||
teamIndex--;
|
teamIndex--;
|
||||||
messageQueue.push_back(ScriptManagerMessage(text, header, -1, teamIndex));
|
messageQueue.push_back(ScriptManagerMessage(text, header, -1, teamIndex));
|
||||||
onMessageBoxOk(false);
|
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){
|
void ScriptManager::showMessage(const string &text, const string &header){
|
||||||
ScriptManager_STREFLOP_Wrapper streflopWrapper;
|
ScriptManager_STREFLOP_Wrapper streflopWrapper;
|
||||||
|
|
||||||
Lang &lang= Lang::getInstance();
|
|
||||||
|
|
||||||
messageQueue.push_back(ScriptManagerMessage(text, header));
|
messageQueue.push_back(ScriptManagerMessage(text, header));
|
||||||
onMessageBoxOk(false);
|
onMessageBoxOk(false);
|
||||||
// messageBox.setEnabled(true);
|
|
||||||
// messageBox.setText(wrapString(lang.getScenarioString(messageQueue.front().getText()), messageWrapCount));
|
|
||||||
// messageBox.setHeader(lang.getScenarioString(messageQueue.front().getHeader()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptManager::clearDisplayText(){
|
void ScriptManager::clearDisplayText(){
|
||||||
|
@@ -1176,7 +1176,6 @@ bool Gui::computeTarget(const Vec2i &screenPos, Vec2i &targetPos, const Unit *&t
|
|||||||
else{
|
else{
|
||||||
targetUnit= NULL;
|
targetUnit= NULL;
|
||||||
if(renderer.computePosition(screenPos, targetPos)){
|
if(renderer.computePosition(screenPos, targetPos)){
|
||||||
const Object* resourceObject;
|
|
||||||
validPosObjWorld= true;
|
validPosObjWorld= true;
|
||||||
posObjWorld= targetPos;
|
posObjWorld= targetPos;
|
||||||
|
|
||||||
|
@@ -2434,10 +2434,8 @@ void runTilesetValidationReport(int argc, char** argv) {
|
|||||||
//disableBacktrace=true;
|
//disableBacktrace=true;
|
||||||
printf("====== Started Validation ======\n");
|
printf("====== Started Validation ======\n");
|
||||||
|
|
||||||
bool purgeDuplicateFiles = false;
|
|
||||||
bool showDuplicateFiles = true;
|
bool showDuplicateFiles = true;
|
||||||
bool purgeUnusedFiles = false;
|
bool purgeUnusedFiles = false;
|
||||||
bool svnPurgeFiles = false;
|
|
||||||
|
|
||||||
double purgedMegaBytes=0;
|
double purgedMegaBytes=0;
|
||||||
Config &config = Config::getInstance();
|
Config &config = Config::getInstance();
|
||||||
|
@@ -38,6 +38,7 @@ ResourceType::ResourceType() {
|
|||||||
defResPerPatch=0;
|
defResPerPatch=0;
|
||||||
recoup_cost = false;
|
recoup_cost = false;
|
||||||
model = NULL;
|
model = NULL;
|
||||||
|
displayInHud = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResourceType::~ResourceType(){
|
ResourceType::~ResourceType(){
|
||||||
|
Reference in New Issue
Block a user