mirror of
https://github.com/vlang/v.git
synced 2025-09-14 06:52:36 +03:00
checker: add missing check for ref passing to non-ref (#22194)
This commit is contained in:
parent
469a532caa
commit
4eb087a347
13 changed files with 54 additions and 14 deletions
|
@ -329,7 +329,7 @@ fn astar_path_finding(mut app App, mut grid [][]Cell, start Point, end Point) {
|
|||
|
||||
g_score[start.x][start.y] = 0
|
||||
f_score[start.x][start.y] = g_score[start.x][start.y] + hf(start, end)
|
||||
priority_queue.insert(&Node{
|
||||
priority_queue.insert(Node{
|
||||
f_score: f_score[start.x][start.y]
|
||||
cell: &Point{
|
||||
x: start.x
|
||||
|
@ -360,7 +360,7 @@ fn astar_path_finding(mut app App, mut grid [][]Cell, start Point, end Point) {
|
|||
if temp_g_score < g_score[neighbor.x][neighbor.y] {
|
||||
g_score[neighbor.x][neighbor.y] = temp_g_score
|
||||
if !(neighbor.x == start.x && neighbor.y == start.y) {
|
||||
priority_queue.insert(&Node{
|
||||
priority_queue.insert(Node{
|
||||
f_score: g_score[neighbor.x][neighbor.y] + hf(neighbor, end)
|
||||
cell: neighbor
|
||||
count: curr_node.count + 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue