From 9db77e3808139fe3364345aa7bf09a5e41198e4c Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 6 May 2008 22:08:18 +0000 Subject: (svn r12976) -Codechange: use w->SetDirty() instead of SetWindowDirty(w) when it's certain that w != NULL. --- src/town_gui.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/town_gui.cpp') diff --git a/src/town_gui.cpp b/src/town_gui.cpp index f805bd1ac..3190554d0 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -239,7 +239,7 @@ static void TownAuthorityWndProc(Window *w, WindowEvent *e) y = GetNthSetBit(GetMaskOfTownActions(NULL, _local_player, t), y + w->vscroll.pos - 1); if (y >= 0) { WP(w, def_d).data_1 = y; - SetWindowDirty(w); + w->SetDirty(); } /* Fall through to clicking in case we are double-clicked */ if (e->event != WE_DOUBLE_CLICK || y < 0) break; @@ -252,7 +252,7 @@ static void TownAuthorityWndProc(Window *w, WindowEvent *e) break; case WE_4: - SetWindowDirty(w); + w->SetDirty(); break; } } @@ -523,13 +523,13 @@ static void TownDirectoryWndProc(Window *w, WindowEvent *e) case TDW_SORTNAME: /* Sort by Name ascending/descending */ _town_sort_order = (_town_sort_order == 0) ? 1 : 0; _town_sort_dirty = true; - SetWindowDirty(w); + w->SetDirty(); break; case TDW_SORTPOPULATION: /* Sort by Population ascending/descending */ _town_sort_order = (_town_sort_order == 2) ? 3 : 2; _town_sort_dirty = true; - SetWindowDirty(w); + w->SetDirty(); break; case TDW_CENTERTOWN: { /* Click on Town Matrix */ @@ -555,7 +555,7 @@ static void TownDirectoryWndProc(Window *w, WindowEvent *e) break; case WE_4: - SetWindowDirty(w); + w->SetDirty(); break; case WE_RESIZE: @@ -671,14 +671,14 @@ static void ScenEditTownGenWndProc(Window *w, WindowEvent *e) w->RaiseWidget(_scengen_town_size + TSEW_SMALLTOWN); _scengen_town_size = e->we.click.widget - TSEW_SMALLTOWN; w->LowerWidget(_scengen_town_size + TSEW_SMALLTOWN); - SetWindowDirty(w); + w->SetDirty(); break; } break; case WE_TIMEOUT: w->RaiseWidget(TSEW_RANDOMTOWN); w->RaiseWidget(TSEW_MANYRANDOMTOWNS); - SetWindowDirty(w); + w->SetDirty(); break; case WE_PLACE_OBJ: @@ -688,7 +688,7 @@ static void ScenEditTownGenWndProc(Window *w, WindowEvent *e) case WE_ABORT_PLACE_OBJ: w->RaiseButtons(); w->LowerWidget(_scengen_town_size + TSEW_SMALLTOWN); - SetWindowDirty(w); + w->SetDirty(); break; } } -- cgit v1.2.3-54-g00ecf