more vc++ compiler warning cleanup
This commit is contained in:
parent
f74198129b
commit
3fb957a13e
|
@ -249,7 +249,7 @@ Intro::Intro(Program *program):
|
||||||
//printf("picIndex = %d list count = %d\n",picIndex,coreData.getMiscTextureList().size());
|
//printf("picIndex = %d list count = %d\n",picIndex,coreData.getMiscTextureList().size());
|
||||||
modelList.push_back(models[index]);
|
modelList.push_back(models[index]);
|
||||||
usedIndex[index]=true;
|
usedIndex[index]=true;
|
||||||
srand((unsigned int)seed.getCurTicks() / modelList.size());
|
srand((unsigned int)seed.getCurTicks() / (unsigned int)modelList.size());
|
||||||
}
|
}
|
||||||
models = modelList;
|
models = modelList;
|
||||||
}
|
}
|
||||||
|
@ -451,7 +451,7 @@ Intro::Intro(Program *program):
|
||||||
//printf("picIndex = %d list count = %d\n",picIndex,coreData.getMiscTextureList().size());
|
//printf("picIndex = %d list count = %d\n",picIndex,coreData.getMiscTextureList().size());
|
||||||
intoTexList.push_back(coreData.getMiscTextureList()[picIndex]);
|
intoTexList.push_back(coreData.getMiscTextureList()[picIndex]);
|
||||||
usedIndex[picIndex]=true;
|
usedIndex[picIndex]=true;
|
||||||
srand((unsigned int)seed.getCurTicks() / intoTexList.size());
|
srand((unsigned int)seed.getCurTicks() / (unsigned int)intoTexList.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -620,7 +620,7 @@ void Intro::renderModelBackground() {
|
||||||
if(models.empty() == false) {
|
if(models.empty() == false) {
|
||||||
int difTime= 1000 * timer / GameConstants::updateFps - modelShowTime;
|
int difTime= 1000 * timer / GameConstants::updateFps - modelShowTime;
|
||||||
int totalModelShowTime = Intro::introTime - modelShowTime;
|
int totalModelShowTime = Intro::introTime - modelShowTime;
|
||||||
int individualModelShowTime = totalModelShowTime / models.size();
|
int individualModelShowTime = totalModelShowTime / (int)models.size();
|
||||||
|
|
||||||
//printf("difTime = %d individualModelShowTime = %d modelIndex = %d\n",difTime,individualModelShowTime,modelIndex);
|
//printf("difTime = %d individualModelShowTime = %d modelIndex = %d\n",difTime,individualModelShowTime,modelIndex);
|
||||||
|
|
||||||
|
|
|
@ -1053,7 +1053,7 @@ void MainWindow::showLanguages() {
|
||||||
}
|
}
|
||||||
|
|
||||||
menuItems.push_back(lang.getString("Exit"));
|
menuItems.push_back(lang.getString("Exit"));
|
||||||
cancelLanguageSelection = menuItems.size()-1;
|
cancelLanguageSelection = (int)menuItems.size()-1;
|
||||||
|
|
||||||
popupMenu.setW(100);
|
popupMenu.setW(100);
|
||||||
popupMenu.setH(100);
|
popupMenu.setH(100);
|
||||||
|
@ -3146,7 +3146,7 @@ void ShowINISettings(int argc, char **argv,Config &config,Config &configKeys) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(displayProperty == true) {
|
if(displayProperty == true) {
|
||||||
int requredTabs = (nameValue.first.length() / 8)+1;
|
int requredTabs = ((int)nameValue.first.length() / 8)+1;
|
||||||
if(nameValue.first.length() % 8) {
|
if(nameValue.first.length() % 8) {
|
||||||
requredTabs++;
|
requredTabs++;
|
||||||
}
|
}
|
||||||
|
@ -3169,7 +3169,7 @@ void ShowINISettings(int argc, char **argv,Config &config,Config &configKeys) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(displayProperty == true) {
|
if(displayProperty == true) {
|
||||||
int requredTabs = (nameValue.first.length() / 8)+1;
|
int requredTabs = ((int)nameValue.first.length() / 8)+1;
|
||||||
if(nameValue.first.length() % 8) {
|
if(nameValue.first.length() % 8) {
|
||||||
requredTabs++;
|
requredTabs++;
|
||||||
}
|
}
|
||||||
|
@ -3196,7 +3196,7 @@ void ShowINISettings(int argc, char **argv,Config &config,Config &configKeys) {
|
||||||
if(displayProperty == true) {
|
if(displayProperty == true) {
|
||||||
printf("Property Name [%s]",nameValue.first.c_str());
|
printf("Property Name [%s]",nameValue.first.c_str());
|
||||||
|
|
||||||
int tabs = (nameValue.first.length() / 8) + 1;
|
int tabs = ((int)nameValue.first.length() / 8) + 1;
|
||||||
for(int j = 0; j < (tabCount - tabs); ++j) {
|
for(int j = 0; j < (tabCount - tabs); ++j) {
|
||||||
printf("\t");
|
printf("\t");
|
||||||
}
|
}
|
||||||
|
@ -3229,7 +3229,7 @@ void ShowINISettings(int argc, char **argv,Config &config,Config &configKeys) {
|
||||||
if(displayProperty == true) {
|
if(displayProperty == true) {
|
||||||
printf("Property Name [%s]",nameValue.first.c_str());
|
printf("Property Name [%s]",nameValue.first.c_str());
|
||||||
|
|
||||||
int tabs = (nameValue.first.length() / 8) + 1;
|
int tabs = ((int)nameValue.first.length() / 8) + 1;
|
||||||
for(int j = 0; j < (tabCount - tabs); ++j) {
|
for(int j = 0; j < (tabCount - tabs); ++j) {
|
||||||
printf("\t");
|
printf("\t");
|
||||||
}
|
}
|
||||||
|
|
|
@ -619,7 +619,7 @@ void NetworkMessageLaunch::buildGameSettings(GameSettings *gameSettings) const {
|
||||||
|
|
||||||
gameSettings->setGameUUID(data.gameUUID.getString());
|
gameSettings->setGameUUID(data.gameUUID.getString());
|
||||||
|
|
||||||
gameSettings->setNetworkAllowNativeLanguageTechtree((bool)data.networkAllowNativeLanguageTechtree);
|
gameSettings->setNetworkAllowNativeLanguageTechtree((data.networkAllowNativeLanguageTechtree != 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
vector<pair<string,uint32> > NetworkMessageLaunch::getFactionCRCList() const {
|
vector<pair<string,uint32> > NetworkMessageLaunch::getFactionCRCList() const {
|
||||||
|
|
|
@ -5237,7 +5237,7 @@ Checksum Unit::getCRC() {
|
||||||
|
|
||||||
//Commands commands;
|
//Commands commands;
|
||||||
if(commands.empty() == false) {
|
if(commands.empty() == false) {
|
||||||
crcForUnit.addInt(commands.size());
|
crcForUnit.addInt((int)commands.size());
|
||||||
for(Commands::const_iterator it= commands.begin(); it != commands.end(); ++it) {
|
for(Commands::const_iterator it= commands.begin(); it != commands.end(); ++it) {
|
||||||
uint32 crc = (*it)->getCRC().getSum();
|
uint32 crc = (*it)->getCRC().getSum();
|
||||||
crcForUnit.addBytes(&crc,sizeof(uint32));
|
crcForUnit.addBytes(&crc,sizeof(uint32));
|
||||||
|
|
|
@ -488,11 +488,11 @@ bool hasCommandArgument(int argc, char** argv,const string argName, int *foundIn
|
||||||
if(foundIndex != NULL) {
|
if(foundIndex != NULL) {
|
||||||
*foundIndex = -1;
|
*foundIndex = -1;
|
||||||
}
|
}
|
||||||
int compareLen = strlen(argName.c_str());
|
int compareLen = (int)strlen(argName.c_str());
|
||||||
|
|
||||||
for(int idx = startLookupIndex; idx < argc; idx++) {
|
for(int idx = startLookupIndex; idx < argc; idx++) {
|
||||||
if(useArgParamLen == true) {
|
if(useArgParamLen == true) {
|
||||||
compareLen = strlen(argv[idx]);
|
compareLen = (int)strlen(argv[idx]);
|
||||||
}
|
}
|
||||||
if(_strnicmp(argName.c_str(),argv[idx],compareLen) == 0) {
|
if(_strnicmp(argName.c_str(),argv[idx],compareLen) == 0) {
|
||||||
result = true;
|
result = true;
|
||||||
|
|
Loading…
Reference in New Issue