aboutsummaryrefslogtreecommitdiff
path: root/core/runtime
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2019-05-28 12:52:20 +0100
committergingerBill <bill@gingerbill.org>2019-05-28 12:52:20 +0100
commitfb3d73cb204e886e0d716f529a64d9549f43c36d (patch)
tree5bc3b1747b7ab34d1257427a7cbc10af38340963 /core/runtime
parent222941727f2b094449838135c3157120e0176e58 (diff)
Make core library use `a..<b` rather than doing `a..b-1`
Diffstat (limited to 'core/runtime')
-rw-r--r--core/runtime/core.odin6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/runtime/core.odin b/core/runtime/core.odin
index 8b6fc7319..50a221a8c 100644
--- a/core/runtime/core.odin
+++ b/core/runtime/core.odin
@@ -892,7 +892,7 @@ __dynamic_map_reserve :: proc(using header: Map_Header, cap: int, loc := #caller
old_len := len(m.hashes);
__slice_resize(&m.hashes, cap, m.entries.allocator, loc);
- for i in old_len..len(m.hashes)-1 do m.hashes[i] = -1;
+ for i in old_len..<len(m.hashes) do m.hashes[i] = -1;
}
__dynamic_map_rehash :: proc(using header: Map_Header, new_count: int, loc := #caller_location) #no_bounds_check {
@@ -909,9 +909,9 @@ __dynamic_map_rehash :: proc(using header: Map_Header, new_count: int, loc := #c
__dynamic_array_reserve(&nm.entries, entry_size, entry_align, m.entries.len, loc);
__slice_resize(&nm.hashes, new_count, m.entries.allocator, loc);
- for i in 0 .. new_count-1 do nm.hashes[i] = -1;
+ for i in 0 ..< new_count do nm.hashes[i] = -1;
- for i in 0 .. m.entries.len-1 {
+ for i in 0 ..< m.entries.len {
if len(nm.hashes) == 0 do __dynamic_map_grow(new_header, loc);
entry_header := __dynamic_map_get_entry(header, i);