diff options
author | yexo <yexo@openttd.org> | 2010-02-11 14:58:51 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2010-02-11 14:58:51 +0000 |
commit | 6406b75b8fb1e1a15dde10534c1fe3aa235e9903 (patch) | |
tree | c7c13b96c05364cc33538173bbbba38ba95aa510 /src/newgrf_gui.cpp | |
parent | 07409e6741c487de7b89264da0e16a86433b37fe (diff) | |
download | openttd-6406b75b8fb1e1a15dde10534c1fe3aa235e9903.tar.xz |
(svn r19094) -Codechange: don't check for NULL values before calling StrEmpty
Diffstat (limited to 'src/newgrf_gui.cpp')
-rw-r--r-- | src/newgrf_gui.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index 8f32e7bcf..f88bdcd89 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -131,7 +131,7 @@ static void ShowNewGRFInfo(const GRFConfig *c, uint x, uint y, uint right, uint if (HasBit(c->flags, GCF_COMPATIBLE)) y = DrawStringMultiLine(x, right, y, bottom, STR_NEWGRF_COMPATIBLE_LOADED); /* Draw GRF info if it exists */ - if (c->info != NULL && !StrEmpty(c->info)) { + if (!StrEmpty(c->info)) { SetDParam(0, STR_JUST_RAW_STRING); SetDParamStr(1, c->info); y = DrawStringMultiLine(x, right, y, bottom, STR_BLACK_STRING); @@ -326,7 +326,7 @@ public: { const GRFConfig *c = this->grfs[i]; bool h = c == this->sel; - const char *text = (c->name != NULL && !StrEmpty(c->name)) ? c->name : c->filename; + const char *text = (!StrEmpty(c->name)) ? c->name : c->filename; /* Draw selection background */ if (h) GfxFillRect(r.left + 1, y, r.right - 1, y + this->resize.step_height - 1, 156); @@ -657,7 +657,7 @@ struct NewGRFWindow : public Window { int i = 0; for (const GRFConfig *c = this->list; c != NULL; c = c->next, i++) { if (this->vscroll.IsVisible(i)) { - const char *text = (c->name != NULL && !StrEmpty(c->name)) ? c->name : c->filename; + const char *text = (!StrEmpty(c->name)) ? c->name : c->filename; PaletteID pal; /* Pick a colour */ |