aboutsummaryrefslogtreecommitdiff
path: root/core/bytes
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2021-06-18 15:42:04 +0200
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2021-06-18 15:42:04 +0200
commit8a4b9ddaa37b0ee8c7213bb91bf507835448ba09 (patch)
treed656490d0c434628e8e169485974b4a6d87689f2 /core/bytes
parent54a2b6f00e49008a1db9907213a99212e17ac5a3 (diff)
Fix comment.
Diffstat (limited to 'core/bytes')
-rw-r--r--core/bytes/util.odin4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/bytes/util.odin b/core/bytes/util.odin
index cb2216ec0..1749230db 100644
--- a/core/bytes/util.odin
+++ b/core/bytes/util.odin
@@ -42,7 +42,7 @@ need_endian_conversion :: proc($FT: typeid, $TT: typeid) -> (res: bool) {
alloc: Buffer was freshly allocated because we couldn't convert in-place. Points to `from_buffer` if `false`.
err: True if we passed too few elements or allocation failed, etc.
- If len(from_buffer) == 0, the input type $FT is ingored and create_buffer_of_type is called to create a fresh buffer.
+ If `from_buffer` is empty, the input type $FT is ignored and `create_buffer_of_type` is called to create a fresh buffer.
This helper will try to do as little work as possible, so if you're converting between two equally sized types,
and they have compatible endianness, the contents will simply be reinterpreted using `slice_data_cast`.
@@ -52,7 +52,7 @@ need_endian_conversion :: proc($FT: typeid, $TT: typeid) -> (res: bool) {
For example, converting `[]u8{0, 60}` from `[]f16` to `[]u16` will return `[15360]` when simply reinterpreted,
and `[1]` if force converted.
- Should you just want to upconvert `f16` to `f32` (or truncate `f32` to `f16`), for example, the size of these elements
+ Should you for example want to promote `[]f16` to `[]f32` (or truncate `[]f32` to `[]f16`), the size of these elements
being different will result in a conversion anyway, so this flag is unnecessary in cases like these.
Example: