mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-10-31 15:20:10 +00:00
(svn r14816) -Fix: signed/unsigned warnings (MSVC)
This commit is contained in:
parent
7869c4ba66
commit
06519a56f2
@ -629,7 +629,7 @@ public:
|
|||||||
case WKC_PAGEDOWN:
|
case WKC_PAGEDOWN:
|
||||||
/* scroll down a page */
|
/* scroll down a page */
|
||||||
if (this->server == NULL) return ES_HANDLED;
|
if (this->server == NULL) return ES_HANDLED;
|
||||||
this->list_pos = (this->list_pos + this->vscroll.cap > this->servers.Length() - 1) ? this->servers.Length() - 1 : this->list_pos + this->vscroll.cap;
|
this->list_pos = min(this->list_pos + this->vscroll.cap, (int)this->servers.Length() - 1);
|
||||||
break;
|
break;
|
||||||
case WKC_HOME:
|
case WKC_HOME:
|
||||||
/* jump to beginning */
|
/* jump to beginning */
|
||||||
|
@ -818,7 +818,7 @@ struct PatchesSelectionWindow : Window {
|
|||||||
|
|
||||||
int x = SETTINGTREE_LEFT_OFFSET;
|
int x = SETTINGTREE_LEFT_OFFSET;
|
||||||
int y = SETTINGTREE_TOP_OFFSET;
|
int y = SETTINGTREE_TOP_OFFSET;
|
||||||
for (uint i = vscroll.pos; i != page->num && i < vscroll.pos + vscroll.cap; i++) {
|
for (uint i = vscroll.pos; i != page->num && vscroll.pos + vscroll.cap - i > 0; i++) {
|
||||||
const SettingDesc *sd = page->entries[i].setting;
|
const SettingDesc *sd = page->entries[i].setting;
|
||||||
DrawPatch(patches_ptr, sd, x, y, this->click - (i * 2));
|
DrawPatch(patches_ptr, sd, x, y, this->click - (i * 2));
|
||||||
y += SETTING_HEIGHT;
|
y += SETTING_HEIGHT;
|
||||||
|
Loading…
Reference in New Issue
Block a user