diff options
author | alberth <alberth@openttd.org> | 2010-05-16 18:50:37 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2010-05-16 18:50:37 +0000 |
commit | 32713624133e86024b90521702fe1173943243c1 (patch) | |
tree | 8b14cf65ae1b49ed8b746a2f87af39bc22276e3f /src/newgrf_config.cpp | |
parent | 9c3b9690fb856506190a4fe51dec573ddb6d9b7b (diff) | |
download | openttd-32713624133e86024b90521702fe1173943243c1.tar.xz |
(svn r19835) -Codechange: Extract grfident equality check to its own method.
Diffstat (limited to 'src/newgrf_config.cpp')
-rw-r--r-- | src/newgrf_config.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/newgrf_config.cpp b/src/newgrf_config.cpp index c3c3f4310..8f4d70f19 100644 --- a/src/newgrf_config.cpp +++ b/src/newgrf_config.cpp @@ -452,11 +452,7 @@ void ScanNewGRFFiles() const GRFConfig *FindGRFConfig(uint32 grfid, const uint8 *md5sum) { for (const GRFConfig *c = _all_grfs; c != NULL; c = c->next) { - if (c->ident.grfid == grfid) { - if (md5sum == NULL) return c; - - if (memcmp(md5sum, c->ident.md5sum, sizeof(c->ident.md5sum)) == 0) return c; - } + if (c->ident.HasGrfIdentifier(grfid, md5sum)) return c; } return NULL; |