diff options
author | rubidium <rubidium@openttd.org> | 2008-05-06 22:08:18 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-05-06 22:08:18 +0000 |
commit | 9bf519f26bc9b3e174803c8ebfd2427bf7c5fb61 (patch) | |
tree | 6760a7b433eda594e11470ba7695e8c399fadbfd /src/news_gui.cpp | |
parent | e6c944a6c4507ec00948391d1b0bdf300bbd879e (diff) | |
download | openttd-9bf519f26bc9b3e174803c8ebfd2427bf7c5fb61.tar.xz |
(svn r12976) -Codechange: use w->SetDirty() instead of SetWindowDirty(w) when it's certain that w != NULL.
Diffstat (limited to 'src/news_gui.cpp')
-rw-r--r-- | src/news_gui.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/news_gui.cpp b/src/news_gui.cpp index 5f1b9a86b..f67e8667f 100644 --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -345,7 +345,7 @@ void AddNewsItem(StringID string, NewsMode display_mode, NewsFlag flags, NewsTyp Window *w = FindWindowById(WC_MESSAGE_HISTORY, 0); if (w == NULL) return; - SetWindowDirty(w); + w->SetDirty(); w->vscroll.count = _total_news; } @@ -520,7 +520,7 @@ static void MoveToNextItem() if (w != NULL) { WP(w, def_d).data_2 = 91; - SetWindowDirty(w); + w->SetDirty(); } break; } @@ -721,7 +721,7 @@ void ShowMessageHistory() w->resize.height = w->height - 12 * 6; // minimum of 4 items in the list, each item 12 high w->resize.step_width = 1; w->resize.width = 200; // can't make window any smaller than 200 pixel - SetWindowDirty(w); + w->SetDirty(); } @@ -809,7 +809,7 @@ static void MessageOptionsWndProc(Window *w, WindowEvent *e) SetMessageButtonStates(w, val, element); _news_type_data[element].display = (NewsDisplay)val; - SetWindowDirty(w); + w->SetDirty(); } break; } @@ -823,7 +823,7 @@ static void MessageOptionsWndProc(Window *w, WindowEvent *e) SetMessageButtonStates(w, e->we.dropdown.index, i); _news_type_data[i].display = (NewsDisplay)e->we.dropdown.index; } - SetWindowDirty(w); + w->SetDirty(); break; } } @@ -990,7 +990,7 @@ void DeleteVehicleNews(VehicleID vid, StringID news) Window *w = FindWindowById(WC_MESSAGE_HISTORY, 0); if (w != NULL) { - SetWindowDirty(w); + w->SetDirty(); w->vscroll.count = _total_news; } } |