summaryrefslogtreecommitdiff
path: root/src/newgrf_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-01-15 17:33:35 +0000
committerfrosch <frosch@openttd.org>2012-01-15 17:33:35 +0000
commit92700c12625e273297ac5f3e3e870b9ed5d047ab (patch)
tree6a9b0c7d2032f822d9259b87919cbec7f0b03b40 /src/newgrf_gui.cpp
parent1dc8de17e061dc7d076fb4ae9c1248277937fce8 (diff)
downloadopenttd-92700c12625e273297ac5f3e3e870b9ed5d047ab.tar.xz
(svn r23807) -Codechange: GRFError::num_params is not needed, remove it.
Diffstat (limited to 'src/newgrf_gui.cpp')
-rw-r--r--src/newgrf_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp
index debda8965..ed3dbe6cc 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -50,7 +50,7 @@ void ShowNewGRFError()
SetDParamStr(3, c->filename);
SetDParam (4, STR_JUST_RAW_STRING);
SetDParamStr(5, c->error->data);
- for (uint i = 0; i < c->error->num_params; i++) {
+ for (uint i = 0; i < lengthof(c->error->param_value); i++) {
SetDParam(6 + i, c->error->param_value[i]);
}
ShowErrorMessage(STR_NEWGRF_ERROR_FATAL_POPUP, INVALID_STRING_ID, WL_CRITICAL);
@@ -67,7 +67,7 @@ static void ShowNewGRFInfo(const GRFConfig *c, uint x, uint y, uint right, uint
SetDParamStr(2, c->filename);
SetDParam (3, STR_JUST_RAW_STRING);
SetDParamStr(4, c->error->data);
- for (uint i = 0; i < c->error->num_params; i++) {
+ for (uint i = 0; i < lengthof(c->error->param_value); i++) {
SetDParam(5 + i, c->error->param_value[i]);
}
GetString(message, c->error->custom_message == NULL ? c->error->message : STR_JUST_RAW_STRING, lastof(message));