summaryrefslogtreecommitdiff
path: root/src/highscore_gui.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-05-18 16:21:28 +0000
committersmatz <smatz@openttd.org>2009-05-18 16:21:28 +0000
commit8808f3beea881af5652716c883a21c8031b5e390 (patch)
treebc14c65d1e66c407b72d254fc926d105eea2f1e4 /src/highscore_gui.cpp
parent5fe906e14992f7a301ae94c357e80af076ab7a63 (diff)
downloadopenttd-8808f3beea881af5652716c883a21c8031b5e390.tar.xz
(svn r16352) -Codechange: use PoolItem::GetIfValid() instead of PoolItem::IsValidID() and PoolItem::Get()
Diffstat (limited to 'src/highscore_gui.cpp')
-rw-r--r--src/highscore_gui.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/highscore_gui.cpp b/src/highscore_gui.cpp
index 920364079..8d33a9b13 100644
--- a/src/highscore_gui.cpp
+++ b/src/highscore_gui.cpp
@@ -88,14 +88,13 @@ struct EndGameWindow : EndGameHighScoreBaseWindow {
virtual void OnPaint()
{
- const Company *c;
uint x, y;
this->SetupHighScoreEndWindow(&x, &y);
- if (!Company::IsValidID(_local_company)) return;
+ const Company *c = Company::GetIfValid(_local_company);
+ if (c == NULL) return;
- c = Company::Get(_local_company);
/* We need to get performance from last year because the image is shown
* at the start of the new year when these things have already been copied */
if (this->background_img == SPR_TYCOON_IMG2_BEGIN) { // Tycoon of the century \o/