just use copyMem
This commit is contained in:
parent
d2a090514d
commit
1e092f4ae8
1 changed files with 2 additions and 2 deletions
|
@ -71,11 +71,11 @@ proc fillUnsafe*(
|
|||
else:
|
||||
when sizeof(int) == 8:
|
||||
# Fill 8 bytes at a time when possible
|
||||
let
|
||||
var
|
||||
u32 = cast[uint32](rgbx)
|
||||
u64 = cast[uint64]([u32, u32])
|
||||
for _ in 0 ..< len div 2:
|
||||
cast[ptr uint64](data[i].addr)[] = u64
|
||||
copyMem(data[i].addr, u64.addr, 8)
|
||||
i += 2
|
||||
# Fill whatever is left the slow way
|
||||
for j in i ..< start + len:
|
||||
|
|
Loading…
Reference in a new issue