diff options
| author | gingerBill <bill@gingerbill.org> | 2024-06-29 12:02:31 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-06-29 12:02:31 +0100 |
| commit | 4b71c47fd5e70f0f96e139e17637cf5de1beb2fc (patch) | |
| tree | 8540dd126a0e18b12c40864433c23dcd2a980f45 /core/image/qoi/qoi.odin | |
| parent | 704530497b166dfa6fcee8f2c95a9e492a78a024 (diff) | |
Check for unneeded `transmute` with `-vet-cast`
Diffstat (limited to 'core/image/qoi/qoi.odin')
| -rw-r--r-- | core/image/qoi/qoi.odin | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/core/image/qoi/qoi.odin b/core/image/qoi/qoi.odin index 061943f68..15ed449da 100644 --- a/core/image/qoi/qoi.odin +++ b/core/image/qoi/qoi.odin @@ -139,15 +139,13 @@ save_to_buffer :: proc(output: ^bytes.Buffer, img: ^Image, options := Options{} } else { // Write RGB literal output.buf[written] = u8(QOI_Opcode_Tag.RGB) - pix_bytes := transmute([4]u8)pix - copy(output.buf[written + 1:], pix_bytes[:3]) + copy(output.buf[written + 1:], pix[:3]) written += 4 } } else { // Write RGBA literal output.buf[written] = u8(QOI_Opcode_Tag.RGBA) - pix_bytes := transmute([4]u8)pix - copy(output.buf[written + 1:], pix_bytes[:]) + copy(output.buf[written + 1:], pix[:]) written += 5 } } |