From: Dale Weiler Date: Wed, 14 Jan 2015 02:39:19 +0000 (-0500) Subject: This is supposted in C99 X-Git-Tag: xonotic-v0.8.2~59 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=dc510baf4f2c8aeec289abf4abd81596c9fe7a8c;p=xonotic%2Fgmqcc.git This is supposted in C99 --- diff --git a/util.c b/util.c index 091ab8d..ceed449 100644 --- a/util.c +++ b/util.c @@ -45,22 +45,12 @@ const char *util_instr_str[VINSTR_END] = { * so let's go the safe way */ static GMQCC_INLINE void util_swap64(uint32_t *d, size_t l) { - /* while (l--) { uint64_t v; v = ((d[l] << 8) & 0xFF00FF00FF00FF00) | ((d[l] >> 8) & 0x00FF00FF00FF00FF); v = ((v << 16) & 0xFFFF0000FFFF0000) | ((v >> 16) & 0x0000FFFF0000FFFF); d[l] = (v << 32) | (v >> 32); } - */ - size_t i; - l *= 2; - for (i = 0; i < l; i += 2) { - uint32_t v1 = d[i]; - d[i] = d[i+1]; - d[i+1] = v1; - util_swap32(d+i, 2); - } } #endif