mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-21 13:55:19 +00:00
Merge branch 'master' of https://github.com/odin-lang/Odin
This commit is contained in:
@@ -26,6 +26,7 @@ ring_prev :: proc(r: ^$R/Ring) -> ^R {
|
||||
|
||||
|
||||
ring_move :: proc(r: ^$R/Ring, n: int) -> ^R {
|
||||
r := r;
|
||||
if r.next == nil {
|
||||
return ring_init(r);
|
||||
}
|
||||
@@ -64,7 +65,7 @@ ring_len :: proc(r: ^$R/Ring) -> int {
|
||||
n := 0;
|
||||
if r != nil {
|
||||
n = 1;
|
||||
for p := ring_next(&p); p != r; p = p.next {
|
||||
for p := ring_next(r); p != r; p = p.next {
|
||||
n += 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user