summaryrefslogtreecommitdiff
path: root/src/town_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-06 22:08:18 +0000
committerrubidium <rubidium@openttd.org>2008-05-06 22:08:18 +0000
commit9db77e3808139fe3364345aa7bf09a5e41198e4c (patch)
tree6760a7b433eda594e11470ba7695e8c399fadbfd /src/town_gui.cpp
parent8796331d83e09dda2ac4642f9215845cc2dd321c (diff)
downloadopenttd-9db77e3808139fe3364345aa7bf09a5e41198e4c.tar.xz
(svn r12976) -Codechange: use w->SetDirty() instead of SetWindowDirty(w) when it's certain that w != NULL.
Diffstat (limited to 'src/town_gui.cpp')
-rw-r--r--src/town_gui.cpp16
1 files changed, 8 insertions, 8 deletions
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;
}
}