mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 22:58:46 +00:00
Replace usage of inline proc with #force_inline proc in the core library
This commit is contained in:
@@ -458,7 +458,7 @@ append_float :: proc(buf: []byte, f: f64, fmt: byte, prec, bit_size: int) -> str
|
||||
|
||||
|
||||
quote :: proc(buf: []byte, str: string) -> string {
|
||||
write_byte :: inline proc(buf: []byte, i: ^int, bytes: ..byte) {
|
||||
write_byte :: proc(buf: []byte, i: ^int, bytes: ..byte) {
|
||||
if i^ >= len(buf) {
|
||||
return;
|
||||
}
|
||||
@@ -496,19 +496,19 @@ quote :: proc(buf: []byte, str: string) -> string {
|
||||
}
|
||||
|
||||
quote_rune :: proc(buf: []byte, r: rune) -> string {
|
||||
write_byte :: inline proc(buf: []byte, i: ^int, bytes: ..byte) {
|
||||
write_byte :: proc(buf: []byte, i: ^int, bytes: ..byte) {
|
||||
if i^ < len(buf) {
|
||||
n := copy(buf[i^:], bytes[:]);
|
||||
i^ += n;
|
||||
}
|
||||
}
|
||||
write_string :: inline proc(buf: []byte, i: ^int, s: string) {
|
||||
write_string :: proc(buf: []byte, i: ^int, s: string) {
|
||||
if i^ < len(buf) {
|
||||
n := copy(buf[i^:], s);
|
||||
i^ += n;
|
||||
}
|
||||
}
|
||||
write_rune :: inline proc(buf: []byte, i: ^int, r: rune) {
|
||||
write_rune :: proc(buf: []byte, i: ^int, r: rune) {
|
||||
if i^ < len(buf) {
|
||||
b, w := utf8.encode_rune(r);
|
||||
n := copy(buf[i^:], b[:w]);
|
||||
|
||||
Reference in New Issue
Block a user