mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Remove incl and excl
This commit is contained in:
@@ -824,39 +824,6 @@ map_insert :: proc(m: ^$T/map[$K]$V, key: K, value: V, loc := #caller_location)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@builtin
|
|
||||||
incl_elem :: proc(s: ^$S/bit_set[$E; $U], elem: E) {
|
|
||||||
s^ |= {elem}
|
|
||||||
}
|
|
||||||
@builtin
|
|
||||||
incl_elems :: proc(s: ^$S/bit_set[$E; $U], elems: ..E) {
|
|
||||||
for elem in elems {
|
|
||||||
s^ |= {elem}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@builtin
|
|
||||||
incl_bit_set :: proc(s: ^$S/bit_set[$E; $U], other: S) {
|
|
||||||
s^ |= other
|
|
||||||
}
|
|
||||||
@builtin
|
|
||||||
excl_elem :: proc(s: ^$S/bit_set[$E; $U], elem: E) {
|
|
||||||
s^ &~= {elem}
|
|
||||||
}
|
|
||||||
@builtin
|
|
||||||
excl_elems :: proc(s: ^$S/bit_set[$E; $U], elems: ..E) {
|
|
||||||
for elem in elems {
|
|
||||||
s^ &~= {elem}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@builtin
|
|
||||||
excl_bit_set :: proc(s: ^$S/bit_set[$E; $U], other: S) {
|
|
||||||
s^ &~= other
|
|
||||||
}
|
|
||||||
|
|
||||||
@builtin incl :: proc{incl_elem, incl_elems, incl_bit_set}
|
|
||||||
@builtin excl :: proc{excl_elem, excl_elems, excl_bit_set}
|
|
||||||
|
|
||||||
|
|
||||||
@builtin
|
@builtin
|
||||||
card :: proc(s: $S/bit_set[$E; $U]) -> int {
|
card :: proc(s: $S/bit_set[$E; $U]) -> int {
|
||||||
when size_of(S) == 1 {
|
when size_of(S) == 1 {
|
||||||
|
|||||||
Reference in New Issue
Block a user