Changeset - r8592:b79e66665a5d
[Not reviewed]
master
0 1 0
peter1138 - 17 years ago 2008-02-18 11:47:53
peter1138@openttd.org
(svn r12173) -Cleanup: Minor codestyle fixes.
1 file changed with 7 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/newgrf_config.cpp
Show inline comments
 
@@ -277,7 +277,7 @@ static bool ScanPathAddGrf(const char *f
 
			_all_grfs = c;
 
		} else {
 
			/* Insert file into list at a position determined by its
 
				* name, so the list is sorted as we go along */
 
			 * name, so the list is sorted as we go along */
 
			GRFConfig **pd, *d;
 
			bool stop = false;
 
			for (pd = &_all_grfs; (d = *pd) != NULL; pd = &d->next) {
 
@@ -285,8 +285,11 @@ static bool ScanPathAddGrf(const char *f
 
				/* Because there can be multiple grfs with the same name, make sure we checked all grfs with the same name,
 
				 *  before inserting the entry. So insert a new grf at the end of all grfs with the same name, instead of
 
				 *  just after the first with the same name. Avoids doubles in the list. */
 
				if (strcasecmp(c->name, d->name) <= 0) stop = true;
 
				else if (stop) break;
 
				if (strcasecmp(c->name, d->name) <= 0) {
 
					stop = true;
 
				} else if (stop) {
 
					break;
 
				}
 
			}
 
			if (added) {
 
				c->next = d;
 
@@ -299,7 +302,7 @@ static bool ScanPathAddGrf(const char *f
 

	
 
	if (!added) {
 
		/* File couldn't be opened, or is either not a NewGRF or is a
 
			* 'system' NewGRF or it's already known, so forget about it. */
 
		 * 'system' NewGRF or it's already known, so forget about it. */
 
		free(c->filename);
 
		free(c->name);
 
		free(c->info);
0 comments (0 inline, 0 general)