summaryrefslogtreecommitdiff
path: root/strgen
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-06-27 21:25:53 +0000
committertron <tron@openttd.org>2006-06-27 21:25:53 +0000
commit2b27073156f40df263cf653263488b8d72a76236 (patch)
tree1bfdb9c99b43fdc3b07ac13cbed4259a06d34f6f /strgen
parentc126ce110ee33bffe07dac5283d8a1648dc662b7 (diff)
downloadopenttd-2b27073156f40df263cf653263488b8d72a76236.tar.xz
(svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular
Diffstat (limited to 'strgen')
-rw-r--r--strgen/strgen.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/strgen/strgen.c b/strgen/strgen.c
index 828f6e2e5..abdcb21bf 100644
--- a/strgen/strgen.c
+++ b/strgen/strgen.c
@@ -890,7 +890,7 @@ static uint32 MyHashStr(uint32 hash, const char *s)
{
for (; *s != '\0'; s++) {
hash = ROL(hash, 3) ^ *s;
- if (hash & 1) hash = (hash >> 1) ^ 0xDEADBEEF; else hash >>= 1;
+ hash = (hash & 1 ? hash >> 1 ^ 0xDEADBEEF : hash >> 1);
}
return hash;
}
@@ -914,7 +914,7 @@ static void MakeHashOfStrings(void)
s = ls->name;
hash ^= i * 0x717239;
- if (hash & 1) hash = (hash >> 1) ^ 0xDEADBEEF; else hash >>= 1;
+ hash = (hash & 1 ? hash >> 1 ^ 0xDEADBEEF : hash >> 1);
hash = MyHashStr(hash, s + 1);
s = ls->english;
@@ -922,7 +922,7 @@ static void MakeHashOfStrings(void)
if (cs->flags & C_DONTCOUNT) continue;
hash ^= (cs - _cmd_structs) * 0x1234567;
- if (hash & 1) hash = (hash >> 1) ^ 0xF00BAA4; else hash >>= 1;
+ hash = (hash & 1 ? hash >> 1 ^ 0xF00BAA4 : hash >> 1);
}
}
}