File diff r15195:d002b61d3001 → r15196:77940844856f
src/newgrf_config.cpp
Show inline comments
 
@@ -449,17 +449,13 @@ void ScanNewGRFFiles()
 
 * @param md5sum Expected MD5 sum (set to \c NULL if not relevant).
 
 * @return The matching grf, if it exists in #_all_grfs, else \c NULL.
 
 */
 
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;
 
}
 

	
 
#ifdef ENABLE_NETWORK