mirror of https://github.com/OpenTTD/OpenTTD
(svn r15215) -Fix: various MSVC x64 compiler warnings
parent
92f5c6b1da
commit
83e1288c6a
|
@ -197,7 +197,7 @@ void AIConfig::StringToSettings(const char *value)
|
||||||
free(value_copy);
|
free(value_copy);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AIConfig::SettingsToString(char *string, int size)
|
void AIConfig::SettingsToString(char *string, size_t size)
|
||||||
{
|
{
|
||||||
string[0] = '\0';
|
string[0] = '\0';
|
||||||
for (SettingValueList::iterator it = this->settings.begin(); it != this->settings.end(); it++) {
|
for (SettingValueList::iterator it = this->settings.begin(); it != this->settings.end(); it++) {
|
||||||
|
|
|
@ -105,7 +105,7 @@ public:
|
||||||
* Convert the custom settings to a string that can be stored in the config
|
* Convert the custom settings to a string that can be stored in the config
|
||||||
* file or savegames.
|
* file or savegames.
|
||||||
*/
|
*/
|
||||||
void SettingsToString(char *string, int size);
|
void SettingsToString(char *string, size_t size);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const char *name;
|
const char *name;
|
||||||
|
|
|
@ -64,7 +64,7 @@ struct AIListWindow : public Window {
|
||||||
this->resize.step_height = 14;
|
this->resize.step_height = 14;
|
||||||
this->vscroll.cap = (this->widget[AIL_WIDGET_LIST].bottom - this->widget[AIL_WIDGET_LIST].top) / 14 + 1;
|
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;
|
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 */
|
/* Try if we can find the currently selected AI */
|
||||||
this->selected = -1;
|
this->selected = -1;
|
||||||
|
@ -251,7 +251,7 @@ struct AISettingsWindow : public Window {
|
||||||
this->resize.step_height = 14;
|
this->resize.step_height = 14;
|
||||||
this->vscroll.cap = (this->widget[AIS_WIDGET_BACKGROUND].bottom - this->widget[AIS_WIDGET_BACKGROUND].top) / 14 + 1;
|
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;
|
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);
|
this->FindWindowPlacementAndResize(desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -380,7 +380,7 @@ DEF_CONTENT_RECEIVE_COMMAND(Client, PACKET_CONTENT_SERVER_CONTENT)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->OnDownloadProgress(this->curInfo, toRead);
|
this->OnDownloadProgress(this->curInfo, (uint)toRead);
|
||||||
|
|
||||||
if (toRead == 0) {
|
if (toRead == 0) {
|
||||||
/* We read nothing; that's our marker for end-of-stream.
|
/* We read nothing; that's our marker for end-of-stream.
|
||||||
|
|
|
@ -528,6 +528,7 @@ public:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NCLWW_UNSELECT:
|
case NCLWW_UNSELECT:
|
||||||
|
_network_content_client.UnselectAll();
|
||||||
this->SetDirty();
|
this->SetDirty();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue