more mutability fixes
parent
e3b5d7fd7c
commit
55f32fc413
|
@ -39,7 +39,7 @@ pub mut:
|
|||
}
|
||||
|
||||
fn new_automaton(f [][]int) Automaton {
|
||||
mut maxy := f.len
|
||||
maxy := f.len
|
||||
mut maxx := 0
|
||||
for y := 0; y<f.len; y++ {
|
||||
if maxx < f[y].len {
|
||||
|
@ -61,7 +61,7 @@ pub fn (aa mut Automaton) update() {
|
|||
for y := 1; y<aa.field.maxy; y++ {
|
||||
for x := 1; x<aa.field.maxx; x++ {
|
||||
moore_sum := ( 0 +
|
||||
aa.field.get(x-1,y-1) + aa.field.get(x,y-1) + aa.field.get(x+1,y-1) +
|
||||
aa.field.get(x-1,y-1) + aa.field.get(x,y-1) + aa.field.get(x+1,y-1) +
|
||||
aa.field.get(x-1,y ) + 0 + aa.field.get(x+1,y ) +
|
||||
aa.field.get(x-1,y+1) + aa.field.get(x,y+1) + aa.field.get(x+1,y+1)
|
||||
)
|
||||
|
|
|
@ -258,6 +258,7 @@ fn (p mut Parser) if_statement(is_expr bool, elif_depth int) string {
|
|||
name: var_name
|
||||
typ: typ
|
||||
is_mut: false // TODO
|
||||
is_used: true // TODO
|
||||
//is_alloc: p.is_alloc || typ.starts_with('array_')
|
||||
//line_nr: p.tokens[ var_token_idx ].line_nr
|
||||
//token_idx: var_token_idx
|
||||
|
|
|
@ -30,7 +30,7 @@ pub fn (wg mut WaitGroup) done() {
|
|||
wg.add(-1)
|
||||
}
|
||||
|
||||
pub fn (wg mut WaitGroup) wait() {
|
||||
pub fn (wg &WaitGroup) wait() {
|
||||
for wg.active > 0 {
|
||||
// Do not remove this, busy empty loops are optimized
|
||||
// with -prod by some compilers, see issue #2874
|
||||
|
|
Loading…
Reference in New Issue