summaryrefslogtreecommitdiff
path: root/src/industry_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/industry_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/industry_gui.cpp')
-rw-r--r--src/industry_gui.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index 9e281e7d8..d84f766ae 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -269,7 +269,7 @@ static void BuildDynamicIndustryWndProc(Window *w, WindowEvent *e)
WP(w, fnd_d).select = _fund_gui.index[WP(w, fnd_d).index];
indsp = (WP(w, fnd_d).select == INVALID_INDUSTRYTYPE) ? NULL : GetIndustrySpec(WP(w, fnd_d).select);
- SetWindowDirty(w);
+ w->SetDirty();
if ((_game_mode != GM_EDITOR && _patches.raw_industry_construction == 2 && indsp != NULL && indsp->IsRawIndustry()) ||
WP(w, fnd_d).select == INVALID_INDUSTRYTYPE) {
@@ -357,7 +357,7 @@ static void BuildDynamicIndustryWndProc(Window *w, WindowEvent *e)
/* Only if result does match the previous state would it require a redraw. */
if (call_back_result != _fund_gui.enabled[WP(w, fnd_d).index]) {
_fund_gui.enabled[WP(w, fnd_d).index] = call_back_result;
- SetWindowDirty(w);
+ w->SetDirty();
}
}
}
@@ -524,9 +524,9 @@ static void IndustryViewWndProc(Window *w, WindowEvent *e)
}
if (y > w->widget[IVW_INFO].bottom) {
- SetWindowDirty(w);
+ w->SetDirty();
ResizeWindowForWidget(w, IVW_INFO, 0, y - w->widget[IVW_INFO].top);
- SetWindowDirty(w);
+ w->SetDirty();
return;
}
@@ -560,7 +560,7 @@ static void IndustryViewWndProc(Window *w, WindowEvent *e)
}
UpdateIndustryProduction(i);
- SetWindowDirty(w);
+ w->SetDirty();
w->flags4 |= 5 << WF_TIMEOUT_SHL;
WP(w, indview_d).clicked_line = line + 1;
WP(w, indview_d).clicked_button = (x < 15 ? 1 : 2);
@@ -587,7 +587,7 @@ static void IndustryViewWndProc(Window *w, WindowEvent *e)
case WE_TIMEOUT:
WP(w, indview_d).clicked_line = 0;
WP(w, indview_d).clicked_button = 0;
- SetWindowDirty(w);
+ w->SetDirty();
break;
case WE_ON_EDIT_TEXT:
@@ -597,7 +597,7 @@ static void IndustryViewWndProc(Window *w, WindowEvent *e)
i->production_rate[line] = ClampU(atoi(e->we.edittext.str), 0, 255);
UpdateIndustryProduction(i);
- SetWindowDirty(w);
+ w->SetDirty();
}
}
}
@@ -842,25 +842,25 @@ static void IndustryDirectoryWndProc(Window *w, WindowEvent *e)
case IDW_SORTBYNAME: {
_industry_sort_order = _industry_sort_order == 0 ? 1 : 0;
_industry_sort_dirty = true;
- SetWindowDirty(w);
+ w->SetDirty();
} break;
case IDW_SORTBYTYPE: {
_industry_sort_order = _industry_sort_order == 2 ? 3 : 2;
_industry_sort_dirty = true;
- SetWindowDirty(w);
+ w->SetDirty();
} break;
case IDW_SORTBYPROD: {
_industry_sort_order = _industry_sort_order == 4 ? 5 : 4;
_industry_sort_dirty = true;
- SetWindowDirty(w);
+ w->SetDirty();
} break;
case IDW_SORTBYTRANSPORT: {
_industry_sort_order = _industry_sort_order == 6 ? 7 : 6;
_industry_sort_dirty = true;
- SetWindowDirty(w);
+ w->SetDirty();
} break;
case IDW_INDUSRTY_LIST: {
@@ -881,7 +881,7 @@ static void IndustryDirectoryWndProc(Window *w, WindowEvent *e)
break;
case WE_4:
- SetWindowDirty(w);
+ w->SetDirty();
break;
case WE_RESIZE:
@@ -907,6 +907,6 @@ void ShowIndustryDirectory()
w->vscroll.cap = 16;
w->resize.height = w->height - 6 * 10; // minimum 10 items
w->resize.step_height = 10;
- SetWindowDirty(w);
+ w->SetDirty();
}
}