summaryrefslogtreecommitdiff
path: root/news_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-06-10 08:37:41 +0000
committertron <tron@openttd.org>2006-06-10 08:37:41 +0000
commita2362674e33e66bf1d27df208db5b2250a01012e (patch)
treeddcc7798b94be03152e4b31cee4bf48bc73774e4 /news_gui.c
parentfee9ee2c05a107e458c20e8773c9adce38a54a4c (diff)
downloadopenttd-a2362674e33e66bf1d27df208db5b2250a01012e.tar.xz
(svn r5210) Many small changes which piled up: const, unsigned, variable scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc.
Diffstat (limited to 'news_gui.c')
-rw-r--r--news_gui.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/news_gui.c b/news_gui.c
index cebe90dc8..0b27ad2ad 100644
--- a/news_gui.c
+++ b/news_gui.c
@@ -221,11 +221,9 @@ static void NewsWindowProc(Window *w, WindowEvent *e)
// (to deal with overflows)
static byte increaseIndex(byte i)
{
- if (i == INVALID_NEWS)
- return 0;
+ if (i == INVALID_NEWS) return 0;
i++;
- if (i >= MAX_NEWS)
- i = i % MAX_NEWS;
+ if (i >= MAX_NEWS) i = i % MAX_NEWS;
return i;
}
@@ -234,8 +232,7 @@ void AddNewsItem(StringID string, uint32 flags, uint data_a, uint data_b)
NewsItem *ni;
Window *w;
- if (_game_mode == GM_MENU)
- return;
+ if (_game_mode == GM_MENU) return;
// check the rare case that the oldest (to be overwritten) news item is open
if (_total_news==MAX_NEWS && (_oldest_news == _current_news || _oldest_news == _forced_news))