diff options
author | rubidium <rubidium@openttd.org> | 2011-02-08 20:52:38 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-02-08 20:52:38 +0000 |
commit | 5f7439a00f28af72edafe4577fa7755b6969ca67 (patch) | |
tree | 0103b584450ed2252e60121d5b0a7b6080acaa07 | |
parent | e1eeca644057fa4e9a0cb4f184f17ef128e3cb05 (diff) | |
download | openttd-5f7439a00f28af72edafe4577fa7755b6969ca67.tar.xz |
(svn r22030) -Cleanup: dead code in NetworkGameWindow::OnInvalidateData (adf88)
-rw-r--r-- | src/network/network_gui.cpp | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index a0f0875a2..371e4dbe8 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -791,37 +791,9 @@ public: virtual void OnInvalidateData(int data) { - switch (data) { - /* Remove the selection */ - case 1: - this->server = NULL; - this->list_pos = SLP_INVALID; - break; - - /* Reiterate the whole server list as we downloaded some files */ - case 2: - for (NetworkGameList **iter = this->servers.Begin(); iter != this->servers.End(); iter++) { - NetworkGameList *item = *iter; - bool missing_grfs = false; - for (GRFConfig *c = item->info.grfconfig; c != NULL; c = c->next) { - if (c->status != GCS_NOT_FOUND) continue; - - const GRFConfig *f = FindGRFConfig(c->ident.grfid, FGCM_EXACT, c->ident.md5sum); - if (f == NULL) { - missing_grfs = true; - continue; - } - - c->filename = f->filename; - CleanUpGRFText(c->name); - c->name = DuplicateGRFText(f->name); - c->info = f->info; - c->status = GCS_UNKNOWN; - } - - if (!missing_grfs) item->info.compatible = item->info.version_compatible; - } - break; + if (data == 1) { + this->server = NULL; + this->list_pos = SLP_INVALID; } this->servers.ForceRebuild(); this->SetDirty(); |