summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-04-10 10:21:16 +0000
committeralberth <alberth@openttd.org>2009-04-10 10:21:16 +0000
commit0f360420fed9e3b6d020c097f152ae06700ea37a (patch)
treec87ce6366d6e907be37f964a8c40795edb82d2f3 /src
parentd28cd968177f6e83d982f4e183fd8e6e031a0ce4 (diff)
downloadopenttd-0f360420fed9e3b6d020c097f152ae06700ea37a.tar.xz
(svn r16009) -Codechange: Simplifying some variable assignments.
Diffstat (limited to 'src')
-rw-r--r--src/music_gui.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/music_gui.cpp b/src/music_gui.cpp
index f7a576f96..ce7221675 100644
--- a/src/music_gui.cpp
+++ b/src/music_gui.cpp
@@ -252,7 +252,8 @@ public:
#endif
y = 23;
- for (p = _playlists[msf.playlist], i = 0; (i = *p) != 0; p++) {
+ for (p = _playlists[msf.playlist]; *p != 0; p++) {
+ i = *p;
SetDParam(0, i);
SetDParam(1, SPECSTR_SONGNAME);
SetDParam(2, i);
@@ -410,9 +411,8 @@ public:
GfxFillRect(60, 46, 239, 52, 0);
- if (_song_is_active == 0 || _music_wnd_cursong == 0) {
- str = STR_01E3;
- } else {
+ str = STR_01E3;
+ if (_song_is_active != 0 && _music_wnd_cursong != 0) {
SetDParam(0, _music_wnd_cursong);
str = (_music_wnd_cursong < 10) ? STR_01E4_0 : STR_01E5;
}