From: Matthew Fernandez Date: Thu, 25 Jun 2020 02:05:54 +0000 (-0700) Subject: relocate vec_get() so we can call it earlier X-Git-Tag: 2.46.0~20^2^2~201^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5ec0aa203e05c2e9eea55d68b666cda3e59fb1df;p=graphviz relocate vec_get() so we can call it earlier --- diff --git a/lib/common/routespl.c b/lib/common/routespl.c index aeea2a166..8fb77d532 100644 --- a/lib/common/routespl.c +++ b/lib/common/routespl.c @@ -927,6 +927,12 @@ static size_t vec_length(const vec* pvec) return pvec->_elems; } +static void* vec_get(vec* pvec, size_t index) +{ + assert(index < pvec->_elems); + return pvec->_mem[index]; +} + static void vec_delete(vec* pvec) { free(pvec->_mem); @@ -942,12 +948,6 @@ static void vec_push_back(vec* pvec, void* data) pvec->_mem[pvec->_elems++] = data; } -static void* vec_get(vec* pvec, size_t index) -{ - assert(index < pvec->_elems); - return pvec->_mem[index]; -} - static void* vec_pop(vec* pvec) { if (pvec->_elems > 0)