Clean up and fix __dynamic_map_erase

This commit is contained in:
gingerBill
2020-11-25 22:36:34 +00:00
parent 8591655334
commit aa859c2187
2 changed files with 15 additions and 6 deletions
+6
View File
@@ -184,6 +184,12 @@ memory_equal :: proc "contextless" (a, b: rawptr, n: int) -> bool {
return memory_compare(a, b, n) == 0;
}
memory_compare :: proc "contextless" (a, b: rawptr, n: int) -> int #no_bounds_check {
switch {
case a == b: return 0;
case a == nil: return -1;
case b == nil: return +1;
}
x := uintptr(a);
y := uintptr(b);
n := uintptr(n);