mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-03 14:18:47 +00:00
Remove unused n from PQ; add reflect.is_bit_set
This commit is contained in:
@@ -85,7 +85,6 @@ _shift_down :: proc(pq: ^$Q/Priority_Queue($T), i0, n: int) -> bool {
|
|||||||
_shift_up :: proc(pq: ^$Q/Priority_Queue($T), j: int) {
|
_shift_up :: proc(pq: ^$Q/Priority_Queue($T), j: int) {
|
||||||
j := j
|
j := j
|
||||||
queue := pq.queue[:]
|
queue := pq.queue[:]
|
||||||
n := builtin.len(queue)
|
|
||||||
for 0 <= j {
|
for 0 <= j {
|
||||||
i := (j-1)/2
|
i := (j-1)/2
|
||||||
if i == j || !pq.less(queue[j], queue[i]) {
|
if i == j || !pq.less(queue[j], queue[i]) {
|
||||||
|
|||||||
@@ -302,6 +302,11 @@ is_dynamic_map :: proc(info: ^Type_Info) -> bool {
|
|||||||
_, ok := type_info_base(info).variant.(Type_Info_Map)
|
_, ok := type_info_base(info).variant.(Type_Info_Map)
|
||||||
return ok
|
return ok
|
||||||
}
|
}
|
||||||
|
is_bit_set :: proc(info: ^Type_Info) -> bool {
|
||||||
|
if info == nil { return false }
|
||||||
|
_, ok := type_info_base(info).variant.(Type_Info_Bit_Set)
|
||||||
|
return ok
|
||||||
|
}
|
||||||
is_slice :: proc(info: ^Type_Info) -> bool {
|
is_slice :: proc(info: ^Type_Info) -> bool {
|
||||||
if info == nil { return false }
|
if info == nil { return false }
|
||||||
_, ok := type_info_base(info).variant.(Type_Info_Slice)
|
_, ok := type_info_base(info).variant.(Type_Info_Slice)
|
||||||
|
|||||||
Reference in New Issue
Block a user