Cosmetic changes

This commit is contained in:
Krzosa Karol
2022-09-27 14:57:10 +02:00
parent dda2252ca2
commit d39686c480
8 changed files with 18 additions and 18 deletions

View File

@@ -74,10 +74,10 @@ Utf32ToUtf16 :: (codepoint: U32): [2]U16, S64
StringToString16 :: (arena: *Arena, in: String): String16
in_str := &in[0]
// @Note(Krzosa): Should be more then enough space
alloc_size := (length_of(in)*2)+1
alloc_size := (Length(in)*2)+1
result := String16{str = PushSize(arena, alloc_size->U64)}
for i := 0, i < length_of(in)
s32, s32_len := Utf8ToUtf32(in_str + i, length_of(in) - i)
for i := 0, i < Length(in)
s32, s32_len := Utf8ToUtf32(in_str + i, Length(in) - i)
if s32_len != 0
i += s32_len
s16, s16_len := Utf32ToUtf16(s32)

View File

@@ -99,9 +99,9 @@ Print :: (string: String, args: ..)
buffer_len: S64
arg_counter := 0
for i := 0, i < length_of(string), i+=1
for i := 0, i < Length(string), i+=1
if string[i] == '%'
Assert(arg_counter < length_of(args), "Passing too many [%] to a print lambda")
Assert(arg_counter < Length(args), "Passing too many [%] to a print lambda")
arg := args[arg_counter++]
if arg.type == S64