Replace usage of inline proc with #force_inline proc in the core library

This commit is contained in:
gingerBill
2021-02-23 16:14:47 +00:00
parent 41b854f192
commit aa93305015
26 changed files with 182 additions and 182 deletions
+4 -4
View File
@@ -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]);