From 83e1288c6a327f711f047aff1e03e5f4a9dfc058 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 23 Jan 2009 02:01:05 +0000 Subject: (svn r15215) -Fix: various MSVC x64 compiler warnings --- src/ai/ai_config.cpp | 2 +- src/ai/ai_config.hpp | 2 +- src/ai/ai_gui.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ai') diff --git a/src/ai/ai_config.cpp b/src/ai/ai_config.cpp index 2595bdf58..2f08e0d14 100644 --- a/src/ai/ai_config.cpp +++ b/src/ai/ai_config.cpp @@ -197,7 +197,7 @@ void AIConfig::StringToSettings(const char *value) free(value_copy); } -void AIConfig::SettingsToString(char *string, int size) +void AIConfig::SettingsToString(char *string, size_t size) { string[0] = '\0'; for (SettingValueList::iterator it = this->settings.begin(); it != this->settings.end(); it++) { diff --git a/src/ai/ai_config.hpp b/src/ai/ai_config.hpp index ba76a3add..39b680f1c 100644 --- a/src/ai/ai_config.hpp +++ b/src/ai/ai_config.hpp @@ -105,7 +105,7 @@ public: * Convert the custom settings to a string that can be stored in the config * file or savegames. */ - void SettingsToString(char *string, int size); + void SettingsToString(char *string, size_t size); private: const char *name; diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp index 0425bd4b5..a68613530 100644 --- a/src/ai/ai_gui.cpp +++ b/src/ai/ai_gui.cpp @@ -64,7 +64,7 @@ struct AIListWindow : public Window { this->resize.step_height = 14; this->vscroll.cap = (this->widget[AIL_WIDGET_LIST].bottom - this->widget[AIL_WIDGET_LIST].top) / 14 + 1; this->widget[AIL_WIDGET_LIST].data = (this->vscroll.cap << 8) + 1; - SetVScrollCount(this, this->ai_info_list->size() + 1); + SetVScrollCount(this, (int)this->ai_info_list->size() + 1); /* Try if we can find the currently selected AI */ this->selected = -1; @@ -251,7 +251,7 @@ struct AISettingsWindow : public Window { this->resize.step_height = 14; this->vscroll.cap = (this->widget[AIS_WIDGET_BACKGROUND].bottom - this->widget[AIS_WIDGET_BACKGROUND].top) / 14 + 1; this->widget[AIS_WIDGET_BACKGROUND].data = (this->vscroll.cap << 8) + 1; - SetVScrollCount(this, this->ai_config->GetConfigList()->size()); + SetVScrollCount(this, (int)this->ai_config->GetConfigList()->size()); this->FindWindowPlacementAndResize(desc); } -- cgit v1.2.3-54-g00ecf