summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-08-14 17:14:04 +0000
committersmatz <smatz@openttd.org>2009-08-14 17:14:04 +0000
commit2d3ddab7ca440e8ca032efd7d15986a1f7b9129b (patch)
treed7b3f8aa85c6fbc4fcd7b7cdf8a6d930b94e3f3c
parentc5533ae4708d85dcdff8e53515e17ab593f7f361 (diff)
downloadopenttd-2d3ddab7ca440e8ca032efd7d15986a1f7b9129b.tar.xz
(svn r17169) -Codechange: apply coding style to some for statements
-rw-r--r--src/misc/crc32.hpp2
-rw-r--r--src/network/core/host.cpp2
-rw-r--r--src/npf.cpp2
-rw-r--r--src/widget.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/misc/crc32.hpp b/src/misc/crc32.hpp
index 4843023df..047976713 100644
--- a/src/misc/crc32.hpp
+++ b/src/misc/crc32.hpp
@@ -15,7 +15,7 @@ struct CCrc32
uint8 *begin = (uint8*)pBuffer;
uint8 *end = begin + nCount;
- for(uint8 *cur = begin; cur < end; cur++)
+ for (uint8 *cur = begin; cur < end; cur++)
crc = (crc >> 8) ^ pTable[cur[0] ^ (uint8)(crc & 0xff)];
crc ^= 0xffffffff;
diff --git a/src/network/core/host.cpp b/src/network/core/host.cpp
index 7adb64f01..ef0db3238 100644
--- a/src/network/core/host.cpp
+++ b/src/network/core/host.cpp
@@ -117,7 +117,7 @@ static void NetworkFindBroadcastIPsInternal(NetworkAddressList *broadcast) // Wi
int num = 2;
INTERFACE_INFO *ifo = CallocT<INTERFACE_INFO>(num);
- for(;;) {
+ for (;;) {
if (WSAIoctl(sock, SIO_GET_INTERFACE_LIST, NULL, 0, ifo, num * sizeof(*ifo), &len, NULL, NULL) == 0) break;
free(ifo);
if (WSAGetLastError() != WSAEFAULT) {
diff --git a/src/npf.cpp b/src/npf.cpp
index 6f64227e7..c916a9e23 100644
--- a/src/npf.cpp
+++ b/src/npf.cpp
@@ -464,7 +464,7 @@ static const PathNode *FindSafePosition(PathNode *path, const Train *v)
/* If there is no signal, reserve the whole path. */
PathNode *sig = path;
- for(; path->parent != NULL; path = path->parent) {
+ for (; path->parent != NULL; path = path->parent) {
if (IsSafeWaitingPosition(v, path->node.tile, path->node.direction, true, _settings_game.pf.forbid_90_deg)) {
sig = path;
}
diff --git a/src/widget.cpp b/src/widget.cpp
index 4ac79afa2..1e2d8b71c 100644
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -2320,7 +2320,7 @@ bool CompareWidgetArrays(const Widget *orig, const Widget *gen, bool report)
}
bool same = true;
- for(int idx = 0; ; idx++) {
+ for (int idx = 0; ; idx++) {
const Widget *ow = orig + idx;
const Widget *gw = gen + idx;