mirror of
https://github.com/glest/glest-source.git
synced 2025-08-29 19:00:07 +02:00
Fixed compiler warnings
This commit is contained in:
@@ -1123,7 +1123,7 @@ namespace Game {
|
|||||||
std::vector < std::string > techInfoList;
|
std::vector < std::string > techInfoList;
|
||||||
Tokenize(techInfo, techInfoList, "|");
|
Tokenize(techInfo, techInfoList, "|");
|
||||||
if (techInfoList.size() >= 6) {
|
if (techInfoList.size() >= 6) {
|
||||||
Config & config = Config::getInstance();
|
//Config & config = Config::getInstance();
|
||||||
ModInfo modinfo;
|
ModInfo modinfo;
|
||||||
modinfo.name = techInfoList[0];
|
modinfo.name = techInfoList[0];
|
||||||
modinfo.count = techInfoList[1];
|
modinfo.count = techInfoList[1];
|
||||||
@@ -1136,7 +1136,7 @@ namespace Game {
|
|||||||
/*string itemPath =
|
/*string itemPath =
|
||||||
config.getPathListForType(ptTechs,
|
config.getPathListForType(ptTechs,
|
||||||
"")[1] + "/" + modinfo.name +
|
"")[1] + "/" + modinfo.name +
|
||||||
string("/*");
|
string("/") + string("*");
|
||||||
if (itemPath.empty() == false) {
|
if (itemPath.empty() == false) {
|
||||||
bool forceRefresh =
|
bool forceRefresh =
|
||||||
(mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end());
|
(mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end());
|
||||||
@@ -1147,7 +1147,7 @@ namespace Game {
|
|||||||
itemPath =
|
itemPath =
|
||||||
config.getPathListForType(ptTechs,
|
config.getPathListForType(ptTechs,
|
||||||
"")[0] + "/" + modinfo.name +
|
"")[0] + "/" + modinfo.name +
|
||||||
string("/*");
|
string("/") + string("*");
|
||||||
if (itemPath.empty() == false) {
|
if (itemPath.empty() == false) {
|
||||||
forceRefresh =
|
forceRefresh =
|
||||||
(mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end());
|
(mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end());
|
||||||
@@ -1192,7 +1192,7 @@ namespace Game {
|
|||||||
std::vector < std::string > tilesetInfoList;
|
std::vector < std::string > tilesetInfoList;
|
||||||
Tokenize(tilesetInfo, tilesetInfoList, "|");
|
Tokenize(tilesetInfo, tilesetInfoList, "|");
|
||||||
if (tilesetInfoList.size() >= 5) {
|
if (tilesetInfoList.size() >= 5) {
|
||||||
Config & config = Config::getInstance();
|
//Config & config = Config::getInstance();
|
||||||
ModInfo modinfo;
|
ModInfo modinfo;
|
||||||
modinfo.name = tilesetInfoList[0];
|
modinfo.name = tilesetInfoList[0];
|
||||||
modinfo.crc = strToUInt(tilesetInfoList[1]);
|
modinfo.crc = strToUInt(tilesetInfoList[1]);
|
||||||
@@ -1204,7 +1204,7 @@ namespace Game {
|
|||||||
/*string itemPath =
|
/*string itemPath =
|
||||||
config.getPathListForType(ptTilesets,
|
config.getPathListForType(ptTilesets,
|
||||||
"")[1] + "/" + modinfo.name +
|
"")[1] + "/" + modinfo.name +
|
||||||
string("/*");
|
string("/") + string("*");
|
||||||
if (itemPath.empty() == false) {
|
if (itemPath.empty() == false) {
|
||||||
bool forceRefresh =
|
bool forceRefresh =
|
||||||
(mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end());
|
(mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end());
|
||||||
@@ -1215,7 +1215,7 @@ namespace Game {
|
|||||||
itemPath =
|
itemPath =
|
||||||
config.getPathListForType(ptTilesets,
|
config.getPathListForType(ptTilesets,
|
||||||
"")[0] + "/" + modinfo.name +
|
"")[0] + "/" + modinfo.name +
|
||||||
string("/*");
|
string("/") + string("*");
|
||||||
if (itemPath.empty() == false) {
|
if (itemPath.empty() == false) {
|
||||||
forceRefresh =
|
forceRefresh =
|
||||||
(mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end());
|
(mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end());
|
||||||
@@ -1374,7 +1374,7 @@ namespace Game {
|
|||||||
std::vector < std::string > scenarioInfoList;
|
std::vector < std::string > scenarioInfoList;
|
||||||
Tokenize(scenarioInfo, scenarioInfoList, "|");
|
Tokenize(scenarioInfo, scenarioInfoList, "|");
|
||||||
if (scenarioInfoList.size() >= 5) {
|
if (scenarioInfoList.size() >= 5) {
|
||||||
Config & config = Config::getInstance();
|
//Config & config = Config::getInstance();
|
||||||
ModInfo modinfo;
|
ModInfo modinfo;
|
||||||
modinfo.name = scenarioInfoList[0];
|
modinfo.name = scenarioInfoList[0];
|
||||||
modinfo.crc = strToUInt(scenarioInfoList[1]);
|
modinfo.crc = strToUInt(scenarioInfoList[1]);
|
||||||
@@ -1386,7 +1386,7 @@ namespace Game {
|
|||||||
/*string itemPath =
|
/*string itemPath =
|
||||||
config.getPathListForType(ptScenarios,
|
config.getPathListForType(ptScenarios,
|
||||||
"")[1] + "/" + modinfo.name +
|
"")[1] + "/" + modinfo.name +
|
||||||
string("/*");
|
string("/") + string("*");
|
||||||
if (itemPath.empty() == false) {
|
if (itemPath.empty() == false) {
|
||||||
bool forceRefresh =
|
bool forceRefresh =
|
||||||
(mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end());
|
(mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end());
|
||||||
@@ -1397,7 +1397,7 @@ namespace Game {
|
|||||||
itemPath =
|
itemPath =
|
||||||
config.getPathListForType(ptScenarios,
|
config.getPathListForType(ptScenarios,
|
||||||
"")[0] + "/" + modinfo.name +
|
"")[0] + "/" + modinfo.name +
|
||||||
string("/*");
|
string("/") + string("*");
|
||||||
if (itemPath.empty() == false) {
|
if (itemPath.empty() == false) {
|
||||||
forceRefresh =
|
forceRefresh =
|
||||||
(mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end());
|
(mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end());
|
||||||
@@ -2223,8 +2223,8 @@ namespace Game {
|
|||||||
bool remoteHasMap =
|
bool remoteHasMap =
|
||||||
(mapCacheList.find(selectedMapName) != mapCacheList.end());
|
(mapCacheList.find(selectedMapName) != mapCacheList.end());
|
||||||
if (remoteHasMap) {
|
if (remoteHasMap) {
|
||||||
ModInfo & modInfo = mapCacheList[selectedMapName];
|
/*ModInfo & modInfo = mapCacheList[selectedMapName];
|
||||||
/*if (modInfo.crc != modInfo.localCRC) {
|
if (modInfo.crc != modInfo.localCRC) {
|
||||||
mainMessageBoxState = ftpmsg_ReplaceMap;
|
mainMessageBoxState = ftpmsg_ReplaceMap;
|
||||||
mainMessageBox.init(lang.getString("Yes"),
|
mainMessageBox.init(lang.getString("Yes"),
|
||||||
lang.getString("No"), 450);
|
lang.getString("No"), 450);
|
||||||
@@ -2316,7 +2316,7 @@ namespace Game {
|
|||||||
(scenarioCacheList.find(selectedScenarioName) !=
|
(scenarioCacheList.find(selectedScenarioName) !=
|
||||||
scenarioCacheList.end());
|
scenarioCacheList.end());
|
||||||
if (remoteHasScenario) {
|
if (remoteHasScenario) {
|
||||||
ModInfo & modInfo = scenarioCacheList[selectedScenarioName];
|
/*ModInfo & modInfo = scenarioCacheList[selectedScenarioName];
|
||||||
if (SystemFlags::VERBOSE_MODE_ENABLED)
|
if (SystemFlags::VERBOSE_MODE_ENABLED)
|
||||||
printf("In [%s::%s Line %d] remote CRC [%u]\n", __FILE__,
|
printf("In [%s::%s Line %d] remote CRC [%u]\n", __FILE__,
|
||||||
__FUNCTION__, __LINE__, modInfo.crc);
|
__FUNCTION__, __LINE__, modInfo.crc);
|
||||||
@@ -2325,8 +2325,8 @@ namespace Game {
|
|||||||
string itemPath =
|
string itemPath =
|
||||||
config.getPathListForType(ptScenarios,
|
config.getPathListForType(ptScenarios,
|
||||||
"")[1] + "/" +
|
"")[1] + "/" +
|
||||||
selectedScenarioName + string("/*");
|
selectedScenarioName + string("/") + string("*");
|
||||||
/*bool forceRefresh =
|
bool forceRefresh =
|
||||||
(mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end());
|
(mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end());
|
||||||
|
|
||||||
if (modInfo.crc != 0 && modInfo.crc !=
|
if (modInfo.crc != 0 && modInfo.crc !=
|
||||||
@@ -2852,9 +2852,9 @@ namespace Game {
|
|||||||
(techCacheList.find(keyTechButtons[i]->getText()) !=
|
(techCacheList.find(keyTechButtons[i]->getText()) !=
|
||||||
techCacheList.end());
|
techCacheList.end());
|
||||||
if (remoteHasTech) {
|
if (remoteHasTech) {
|
||||||
ModInfo & modInfo =
|
/*ModInfo & modInfo =
|
||||||
techCacheList[keyTechButtons[i]->getText()];
|
techCacheList[keyTechButtons[i]->getText()];
|
||||||
//if (modInfo.crc == modInfo.localCRC) {
|
if (modInfo.crc == modInfo.localCRC) {*/
|
||||||
keyTechButtons[i]->
|
keyTechButtons[i]->
|
||||||
setCustomTexture(CoreData::getInstance().
|
setCustomTexture(CoreData::getInstance().
|
||||||
getOnServerInstalledTexture());
|
getOnServerInstalledTexture());
|
||||||
@@ -2905,10 +2905,10 @@ namespace Game {
|
|||||||
(tilesetCacheList.find(keyTilesetButtons[i]->getText()) !=
|
(tilesetCacheList.find(keyTilesetButtons[i]->getText()) !=
|
||||||
tilesetCacheList.end());
|
tilesetCacheList.end());
|
||||||
if (remoteHasTileset) {
|
if (remoteHasTileset) {
|
||||||
ModInfo & modInfo =
|
/*ModInfo & modInfo =
|
||||||
tilesetCacheList[keyTilesetButtons[i]->getText()];
|
tilesetCacheList[keyTilesetButtons[i]->getText()];
|
||||||
|
|
||||||
//if (modInfo.crc == modInfo.localCRC) {
|
if (modInfo.crc == modInfo.localCRC) {*/
|
||||||
keyTilesetButtons[i]->
|
keyTilesetButtons[i]->
|
||||||
setCustomTexture(CoreData::getInstance().
|
setCustomTexture(CoreData::getInstance().
|
||||||
getOnServerInstalledTexture());
|
getOnServerInstalledTexture());
|
||||||
@@ -2961,9 +2961,9 @@ namespace Game {
|
|||||||
(mapCacheList.find(keyMapButtons[i]->getText()) !=
|
(mapCacheList.find(keyMapButtons[i]->getText()) !=
|
||||||
mapCacheList.end());
|
mapCacheList.end());
|
||||||
if (remoteHasMap) {
|
if (remoteHasMap) {
|
||||||
ModInfo & modInfo =
|
/*ModInfo & modInfo =
|
||||||
mapCacheList[keyMapButtons[i]->getText()];
|
mapCacheList[keyMapButtons[i]->getText()];
|
||||||
//if (modInfo.crc == modInfo.localCRC) {
|
if (modInfo.crc == modInfo.localCRC) {*/
|
||||||
keyMapButtons[i]->
|
keyMapButtons[i]->
|
||||||
setCustomTexture(CoreData::getInstance().
|
setCustomTexture(CoreData::getInstance().
|
||||||
getOnServerInstalledTexture());
|
getOnServerInstalledTexture());
|
||||||
@@ -3020,9 +3020,9 @@ namespace Game {
|
|||||||
(scenarioCacheList.find(keyScenarioButtons[i]->getText()) !=
|
(scenarioCacheList.find(keyScenarioButtons[i]->getText()) !=
|
||||||
scenarioCacheList.end());
|
scenarioCacheList.end());
|
||||||
if (remoteHasScenario) {
|
if (remoteHasScenario) {
|
||||||
ModInfo & modInfo =
|
/*ModInfo & modInfo =
|
||||||
scenarioCacheList[keyScenarioButtons[i]->getText()];
|
scenarioCacheList[keyScenarioButtons[i]->getText()];
|
||||||
//if (modInfo.crc == modInfo.localCRC) {
|
if (modInfo.crc == modInfo.localCRC) {*/
|
||||||
keyScenarioButtons[i]->
|
keyScenarioButtons[i]->
|
||||||
setCustomTexture(CoreData::getInstance().
|
setCustomTexture(CoreData::getInstance().
|
||||||
getOnServerInstalledTexture());
|
getOnServerInstalledTexture());
|
||||||
@@ -3111,11 +3111,11 @@ namespace Game {
|
|||||||
pleaseWaitLabel.setText(lang.
|
pleaseWaitLabel.setText(lang.
|
||||||
getString
|
getString
|
||||||
("GettingModlistFromMasterserver"));
|
("GettingModlistFromMasterserver"));
|
||||||
}/* else if (modMenuState == mmst_CalculatingCRC) {
|
} else if (modMenuState == mmst_CalculatingCRC) {
|
||||||
pleaseWaitLabel.setText(lang.
|
pleaseWaitLabel.setText(lang.
|
||||||
getString
|
getString
|
||||||
("PleaseWaitCalculatingCRC"));
|
("PleaseWaitCalculatingCRC"));
|
||||||
}*/
|
}
|
||||||
oldMenuState = modMenuState;
|
oldMenuState = modMenuState;
|
||||||
}
|
}
|
||||||
float anim = GraphicComponent::getAnim();
|
float anim = GraphicComponent::getAnim();
|
||||||
@@ -3482,12 +3482,12 @@ namespace Game {
|
|||||||
filterFileExt);
|
filterFileExt);
|
||||||
|
|
||||||
// Refresh CRC
|
// Refresh CRC
|
||||||
Config & config = Config::getInstance();
|
/*Config & config = Config::getInstance();
|
||||||
/*getFolderTreeContentsCheckSumRecursively(config.
|
getFolderTreeContentsCheckSumRecursively(config.
|
||||||
getPathListForType
|
getPathListForType
|
||||||
(ptTechs, ""),
|
(ptTechs, ""),
|
||||||
string("/") + itemName +
|
string("/") + itemName +
|
||||||
string("/*"), ".xml",
|
string("/") + string("*"), ".xml",
|
||||||
NULL, true);*/
|
NULL, true);*/
|
||||||
safeMutexFTPProgress.ReleaseLock();
|
safeMutexFTPProgress.ReleaseLock();
|
||||||
|
|
||||||
@@ -3548,12 +3548,12 @@ namespace Game {
|
|||||||
filterFileExt);
|
filterFileExt);
|
||||||
|
|
||||||
// Refresh CRC
|
// Refresh CRC
|
||||||
Config & config = Config::getInstance();
|
/*Config & config = Config::getInstance();
|
||||||
/*getFolderTreeContentsCheckSumRecursively(config.
|
getFolderTreeContentsCheckSumRecursively(config.
|
||||||
getPathListForType
|
getPathListForType
|
||||||
(ptScenarios, ""),
|
(ptScenarios, ""),
|
||||||
string("/") + itemName +
|
string("/") + itemName +
|
||||||
string("/*"), ".xml",
|
string("/") + string("*"), ".xml",
|
||||||
NULL, true);*/
|
NULL, true);*/
|
||||||
safeMutexFTPProgress.ReleaseLock();
|
safeMutexFTPProgress.ReleaseLock();
|
||||||
|
|
||||||
|
@@ -47,7 +47,7 @@ namespace Game {
|
|||||||
enum ModMenuState {
|
enum ModMenuState {
|
||||||
mmst_None,
|
mmst_None,
|
||||||
mmst_Loading,
|
mmst_Loading,
|
||||||
//mmst_CalculatingCRC
|
mmst_CalculatingCRC
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef vector < GraphicButton * >UserButtons;
|
typedef vector < GraphicButton * >UserButtons;
|
||||||
|
Reference in New Issue
Block a user