mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-27 14:12:36 +00:00
This is supposted in C99
This commit is contained in:
parent
b5ac2745d6
commit
dc510baf4f
1 changed files with 0 additions and 10 deletions
10
util.c
10
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue