mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-20 21:19:10 +00:00
(svn r3078) Some more stuff, which piled up:
- const, whitespace, indentation, bracing, GB/SB, pointless casts - use the trinary operator where appropriate - data types (uint[] -> AcceptedCargo, ...) - if cascade -> switch - if (ptr) -> if (ptr != NULL) - DeMorgan's Law - Fix some comments - 0 -> '\0', change magic numbers to symbolic constants
This commit is contained in:
@@ -151,7 +151,7 @@ static void NetworkGameWindowWndProc(Window *w, WindowEvent *e)
|
||||
|
||||
cur_item = cur_item->next;
|
||||
y += NET_PRC__SIZE_OF_ROW;
|
||||
if (++n == w->vscroll.cap) { break;} // max number of games in the window
|
||||
if (++n == w->vscroll.cap) break; // max number of games in the window
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@ static void NetworkGameWindowWndProc(Window *w, WindowEvent *e)
|
||||
case 9: { /* Matrix to show networkgames */
|
||||
uint32 id_v = (e->click.pt.y - NET_PRC__OFFSET_TOP_WIDGET) / NET_PRC__SIZE_OF_ROW;
|
||||
|
||||
if (id_v >= w->vscroll.cap) { return;} // click out of bounds
|
||||
if (id_v >= w->vscroll.cap) return; // click out of bounds
|
||||
id_v += w->vscroll.pos;
|
||||
|
||||
{
|
||||
|
Reference in New Issue
Block a user