diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-01-10 10:14:45 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-01-10 10:14:45 +0100 |
commit | 5e8e882c7092feaaf4a56506dbda611ed7755d28 (patch) | |
tree | a47d7137b90f719773c1efc253cd40f4d85a42bd /src/lib/eina_graph_bfs.c | |
parent | b9cc34a3cc89992ad211bd6e5d6da61c435f46c7 (diff) | |
download | eina_graph-5e8e882c7092feaaf4a56506dbda611ed7755d28.zip eina_graph-5e8e882c7092feaaf4a56506dbda611ed7755d28.tar.gz |
use eina_array for adjacents list instead of custom implementation
Diffstat (limited to 'src/lib/eina_graph_bfs.c')
-rw-r--r-- | src/lib/eina_graph_bfs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/eina_graph_bfs.c b/src/lib/eina_graph_bfs.c index 651695f..2632c4a 100644 --- a/src/lib/eina_graph_bfs.c +++ b/src/lib/eina_graph_bfs.c @@ -37,7 +37,7 @@ static void _eina_graph_bfs_fwalk(_Eina_Graph *_g, _Eina_Graph_BFS *_bfs, unsigned int v) { Eina_List *fifo = NULL; - _Eina_Graph_Adjacents *adjs; + Eina_Array *adjs; _Eina_Graph_BFS_Data *vd; unsigned int p, w, n, i, d; @@ -56,11 +56,11 @@ _eina_graph_bfs_fwalk(_Eina_Graph *_g, _Eina_Graph_BFS *_bfs, unsigned int v) p = w; d++; - adjs = &_g->adjs[w]; - n = adjs->count; + adjs = _g->adjs[w]; + n = eina_array_count_get(adjs); for (i = 0; i < n; i++) { - w = adjs->data[i]; + w = eina_array_uint_nth_get(adjs, i); vd = &_bfs->data[w]; if (!vd->m) { |