# HG changeset patch # User alberth # Date 2009-09-19 16:22:49 # Node ID f6d41dc9c68aab3ed786eaa5ebca7ac7e3545e00 # Parent b94cca1a815d9544201ce812f793fd9611a3a34f (svn r17580) -Fix (r17541): Fix signed/unsigned mismatch with MSVC 2008. diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -300,10 +300,10 @@ public: GfxFillRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, 0xD7); uint y = r.top + WD_FRAMERECT_TOP; - int min_index = this->vscroll.GetPosition(); - int max_index = min(min_index + this->vscroll.GetCapacity(), this->grfs.Length()); + uint min_index = this->vscroll.GetPosition(); + uint max_index = min(min_index + this->vscroll.GetCapacity(), this->grfs.Length()); - for (int i = min_index; i < max_index; i++) + for (uint i = min_index; i < max_index; i++) { const GRFConfig *c = this->grfs[i]; bool h = c == this->sel;