more vc++ compiler warning cleanup

This commit is contained in:
Mark Vejvoda 2013-11-02 22:58:00 +00:00
parent f74198129b
commit 3fb957a13e
5 changed files with 12 additions and 12 deletions

View File

@ -249,7 +249,7 @@ Intro::Intro(Program *program):
//printf("picIndex = %d list count = %d\n",picIndex,coreData.getMiscTextureList().size());
modelList.push_back(models[index]);
usedIndex[index]=true;
srand((unsigned int)seed.getCurTicks() / modelList.size());
srand((unsigned int)seed.getCurTicks() / (unsigned int)modelList.size());
}
models = modelList;
}
@ -451,7 +451,7 @@ Intro::Intro(Program *program):
//printf("picIndex = %d list count = %d\n",picIndex,coreData.getMiscTextureList().size());
intoTexList.push_back(coreData.getMiscTextureList()[picIndex]);
usedIndex[picIndex]=true;
srand((unsigned int)seed.getCurTicks() / intoTexList.size());
srand((unsigned int)seed.getCurTicks() / (unsigned int)intoTexList.size());
}
}
else {
@ -620,7 +620,7 @@ void Intro::renderModelBackground() {
if(models.empty() == false) {
int difTime= 1000 * timer / GameConstants::updateFps - 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);

View File

@ -1053,7 +1053,7 @@ void MainWindow::showLanguages() {
}
menuItems.push_back(lang.getString("Exit"));
cancelLanguageSelection = menuItems.size()-1;
cancelLanguageSelection = (int)menuItems.size()-1;
popupMenu.setW(100);
popupMenu.setH(100);
@ -3146,7 +3146,7 @@ void ShowINISettings(int argc, char **argv,Config &config,Config &configKeys) {
}
if(displayProperty == true) {
int requredTabs = (nameValue.first.length() / 8)+1;
int requredTabs = ((int)nameValue.first.length() / 8)+1;
if(nameValue.first.length() % 8) {
requredTabs++;
}
@ -3169,7 +3169,7 @@ void ShowINISettings(int argc, char **argv,Config &config,Config &configKeys) {
}
if(displayProperty == true) {
int requredTabs = (nameValue.first.length() / 8)+1;
int requredTabs = ((int)nameValue.first.length() / 8)+1;
if(nameValue.first.length() % 8) {
requredTabs++;
}
@ -3196,7 +3196,7 @@ void ShowINISettings(int argc, char **argv,Config &config,Config &configKeys) {
if(displayProperty == true) {
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) {
printf("\t");
}
@ -3229,7 +3229,7 @@ void ShowINISettings(int argc, char **argv,Config &config,Config &configKeys) {
if(displayProperty == true) {
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) {
printf("\t");
}

View File

@ -619,7 +619,7 @@ void NetworkMessageLaunch::buildGameSettings(GameSettings *gameSettings) const {
gameSettings->setGameUUID(data.gameUUID.getString());
gameSettings->setNetworkAllowNativeLanguageTechtree((bool)data.networkAllowNativeLanguageTechtree);
gameSettings->setNetworkAllowNativeLanguageTechtree((data.networkAllowNativeLanguageTechtree != 0));
}
vector<pair<string,uint32> > NetworkMessageLaunch::getFactionCRCList() const {

View File

@ -5237,7 +5237,7 @@ Checksum Unit::getCRC() {
//Commands commands;
if(commands.empty() == false) {
crcForUnit.addInt(commands.size());
crcForUnit.addInt((int)commands.size());
for(Commands::const_iterator it= commands.begin(); it != commands.end(); ++it) {
uint32 crc = (*it)->getCRC().getSum();
crcForUnit.addBytes(&crc,sizeof(uint32));

View File

@ -488,11 +488,11 @@ bool hasCommandArgument(int argc, char** argv,const string argName, int *foundIn
if(foundIndex != NULL) {
*foundIndex = -1;
}
int compareLen = strlen(argName.c_str());
int compareLen = (int)strlen(argName.c_str());
for(int idx = startLookupIndex; idx < argc; idx++) {
if(useArgParamLen == true) {
compareLen = strlen(argv[idx]);
compareLen = (int)strlen(argv[idx]);
}
if(_strnicmp(argName.c_str(),argv[idx],compareLen) == 0) {
result = true;