From 6faf024ab49c35d3f0730769664266e42cc9d88c Mon Sep 17 00:00:00 2001 From: gingerBill Date: Tue, 2 Mar 2021 00:40:40 +0000 Subject: [PATCH] Remove unneeded return value from `incl` and `excl` --- core/runtime/core_builtin.odin | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/core/runtime/core_builtin.odin b/core/runtime/core_builtin.odin index 547379721..9f6d1b35b 100644 --- a/core/runtime/core_builtin.odin +++ b/core/runtime/core_builtin.odin @@ -500,38 +500,32 @@ resize_dynamic_array :: proc(array: ^$T/[dynamic]$E, length: int, loc := #caller @builtin -incl_elem :: proc(s: ^$S/bit_set[$E; $U], elem: E) -> S { +incl_elem :: proc(s: ^$S/bit_set[$E; $U], elem: E) { s^ |= {elem}; - return s^; } @builtin -incl_elems :: proc(s: ^$S/bit_set[$E; $U], elems: ..E) -> S { +incl_elems :: proc(s: ^$S/bit_set[$E; $U], elems: ..E) { for elem in elems { s^ |= {elem}; } - return s^; } @builtin -incl_bit_set :: proc(s: ^$S/bit_set[$E; $U], other: S) -> S { +incl_bit_set :: proc(s: ^$S/bit_set[$E; $U], other: S) { s^ |= other; - return s^; } @builtin -excl_elem :: proc(s: ^$S/bit_set[$E; $U], elem: E) -> S { +excl_elem :: proc(s: ^$S/bit_set[$E; $U], elem: E) { s^ &~= {elem}; - return s^; } @builtin -excl_elems :: proc(s: ^$S/bit_set[$E; $U], elems: ..E) -> S { +excl_elems :: proc(s: ^$S/bit_set[$E; $U], elems: ..E) { for elem in elems { s^ &~= {elem}; } - return s^; } @builtin -excl_bit_set :: proc(s: ^$S/bit_set[$E; $U], other: S) -> S { +excl_bit_set :: proc(s: ^$S/bit_set[$E; $U], other: S) { s^ &~= other; - return s^; } @builtin incl :: proc{incl_elem, incl_elems, incl_bit_set};