Merge branch 'master' into jgrpp
# Conflicts: # src/core/smallmap_type.hpp # src/lang/korean.txt # src/network/network_content.cpp # src/smallmap_gui.cpp # src/station_cmd.cpp
This commit is contained in:
@@ -305,7 +305,7 @@ void ClientNetworkContentSocketHandler::DownloadSelectedContent(uint &files, uin
|
||||
bytes += ci->filesize;
|
||||
}
|
||||
|
||||
files = content.size();
|
||||
files = (uint)content.size();
|
||||
|
||||
/* If there's nothing to download, do nothing. */
|
||||
if (files == 0) return;
|
||||
@@ -323,7 +323,7 @@ void ClientNetworkContentSocketHandler::DownloadSelectedContent(uint &files, uin
|
||||
*/
|
||||
void ClientNetworkContentSocketHandler::DownloadSelectedContentHTTP(const ContentIDList &content)
|
||||
{
|
||||
uint count = content.size();
|
||||
uint count = (uint)content.size();
|
||||
|
||||
/* Allocate memory for the whole request.
|
||||
* Requests are "id\nid\n..." (as strings), so assume the maximum ID,
|
||||
@@ -351,7 +351,7 @@ void ClientNetworkContentSocketHandler::DownloadSelectedContentHTTP(const Conten
|
||||
*/
|
||||
void ClientNetworkContentSocketHandler::DownloadSelectedContentFallback(const ContentIDList &content)
|
||||
{
|
||||
uint count = content.size();
|
||||
uint count = (uint)content.size();
|
||||
const ContentID *content_ids = content.data();
|
||||
this->Connect();
|
||||
|
||||
|
@@ -129,7 +129,7 @@ public:
|
||||
void CheckDependencyState(ContentInfo *ci);
|
||||
|
||||
/** Get the number of content items we know locally. */
|
||||
uint Length() const { return this->infos.size(); }
|
||||
uint Length() const { return (uint)this->infos.size(); }
|
||||
/** Get the begin of the content inf iterator. */
|
||||
ConstContentIterator Begin() const { return this->infos.data(); }
|
||||
/** Get the nth position of the content inf iterator. */
|
||||
|
@@ -400,7 +400,7 @@ class NetworkContentListWindow : public Window, ContentCallback {
|
||||
this->content.RebuildDone();
|
||||
this->SortContentList();
|
||||
|
||||
this->vscroll->SetCount(this->content.size()); // Update the scrollbar
|
||||
this->vscroll->SetCount((int)this->content.size()); // Update the scrollbar
|
||||
this->ScrollToSelected();
|
||||
}
|
||||
|
||||
@@ -636,9 +636,8 @@ public:
|
||||
uint y = r.top;
|
||||
|
||||
auto iter = this->content.begin() + this->vscroll->GetPosition();
|
||||
auto end = iter + this->vscroll->GetCapacity();
|
||||
if (end > this->content.end())
|
||||
end = this->content.end();
|
||||
size_t last = this->vscroll->GetPosition() + this->vscroll->GetCapacity();
|
||||
auto end = (last < this->content.size()) ? this->content.begin() + last : this->content.end();
|
||||
|
||||
for (/**/; iter != end; iter++) {
|
||||
const ContentInfo *ci = *iter;
|
||||
@@ -813,7 +812,7 @@ public:
|
||||
case WID_NCL_NAME:
|
||||
if (this->content.SortType() == widget - WID_NCL_CHECKBOX) {
|
||||
this->content.ToggleSortOrder();
|
||||
if (this->content.size() > 0) this->list_pos = this->content.size() - this->list_pos - 1;
|
||||
if (this->content.size() > 0) this->list_pos = (int)this->content.size() - this->list_pos - 1;
|
||||
} else {
|
||||
this->content.SetSortType(widget - WID_NCL_CHECKBOX);
|
||||
this->content.ForceResort();
|
||||
@@ -888,7 +887,7 @@ public:
|
||||
break;
|
||||
case WKC_END:
|
||||
/* jump to end */
|
||||
this->list_pos = this->content.size() - 1;
|
||||
this->list_pos = (int)this->content.size() - 1;
|
||||
break;
|
||||
|
||||
case WKC_SPACE:
|
||||
|
@@ -271,7 +271,7 @@ protected:
|
||||
|
||||
this->servers.shrink_to_fit();
|
||||
this->servers.RebuildDone();
|
||||
this->vscroll->SetCount(this->servers.size());
|
||||
this->vscroll->SetCount((int)this->servers.size());
|
||||
|
||||
/* Sort the list of network games as requested. */
|
||||
this->servers.Sort();
|
||||
@@ -712,7 +712,7 @@ public:
|
||||
case WID_NG_INFO: // Connectivity (green dot)
|
||||
if (this->servers.SortType() == widget - WID_NG_NAME) {
|
||||
this->servers.ToggleSortOrder();
|
||||
if (this->list_pos != SLP_INVALID) this->list_pos = this->servers.size() - this->list_pos - 1;
|
||||
if (this->list_pos != SLP_INVALID) this->list_pos = (ServerListPosition)this->servers.size() - this->list_pos - 1;
|
||||
} else {
|
||||
this->servers.SetSortType(widget - WID_NG_NAME);
|
||||
this->servers.ForceResort();
|
||||
@@ -849,7 +849,7 @@ public:
|
||||
break;
|
||||
case WKC_END:
|
||||
/* jump to end */
|
||||
this->list_pos = this->servers.size() - 1;
|
||||
this->list_pos = (ServerListPosition)this->servers.size() - 1;
|
||||
break;
|
||||
default: NOT_REACHED();
|
||||
}
|
||||
@@ -1776,7 +1776,7 @@ struct NetworkClientListPopupWindow : Window {
|
||||
d = maxdim(GetStringBoundingBox(action.name), d);
|
||||
}
|
||||
|
||||
d.height *= this->actions.size();
|
||||
d.height *= (uint)this->actions.size();
|
||||
d.width += WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT;
|
||||
d.height += WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
|
||||
*size = d;
|
||||
|
Reference in New Issue
Block a user