summaryrefslogtreecommitdiff
path: root/src/newgrf_config.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-02-18 11:47:53 +0000
committerpeter1138 <peter1138@openttd.org>2008-02-18 11:47:53 +0000
commit06de1215c1db2d1483bb140444e6f034094e5e25 (patch)
treea10bc5f3807a4593628a7c55cc8c2fdfba6369c8 /src/newgrf_config.cpp
parentdb0eb9570ce985d68f86d9d22ecd92cbc1579439 (diff)
downloadopenttd-06de1215c1db2d1483bb140444e6f034094e5e25.tar.xz
(svn r12173) -Cleanup: Minor codestyle fixes.
Diffstat (limited to 'src/newgrf_config.cpp')
-rw-r--r--src/newgrf_config.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/newgrf_config.cpp b/src/newgrf_config.cpp
index 95fc46ce1..b1ce86601 100644
--- a/src/newgrf_config.cpp
+++ b/src/newgrf_config.cpp
@@ -277,7 +277,7 @@ static bool ScanPathAddGrf(const char *filename)
_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 *filename)
/* 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 *filename)
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);