diff options
| author | Tyge Løvset <[email protected]> | 2022-08-12 21:54:53 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-08-12 21:54:53 +0200 |
| commit | ccb63f1abbae18657708dd8ea38e0892aa0fc48a (patch) | |
| tree | f64f432f79ce1552951e2a88d80824af964878b6 /examples/astar.c | |
| parent | 5f8a7951996728f6e91ef9ae2e904ce51ac0c883 (diff) | |
| download | STC-modified-ccb63f1abbae18657708dd8ea38e0892aa0fc48a.tar.gz STC-modified-ccb63f1abbae18657708dd8ea38e0892aa0fc48a.zip | |
cstr V4: Changed cstr functions to take pointers to self, not values. This is consistent with the rest of the containers. csview will still use values, as it is designed to be passed by value.
Diffstat (limited to 'examples/astar.c')
| -rw-r--r-- | examples/astar.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/astar.c b/examples/astar.c index 7d90bf35..cb498b11 100644 --- a/examples/astar.c +++ b/examples/astar.c @@ -37,7 +37,7 @@ point_equal(const point* a, const point* b) point point_from(const cstr* maze, const char* c, int width) { - int index = cstr_find(*maze, c); + int index = cstr_find(maze, c); return point_init(index % width, index / width, width); } @@ -156,7 +156,7 @@ main(void) "# # # # # # #\n" "#########################################################################\n"), cstr_drop(&maze)) { - int width = cstr_find(maze, "\n") + 1; + int width = cstr_find(&maze, "\n") + 1; c_autovar (cdeq_point path = astar(&maze, width), cdeq_point_drop(&path)) { c_foreach (it, cdeq_point, path) cstr_data(&maze)[point_index(it.ref)] = 'x'; |
