From 88237536a72d70abfc670286eae1cf7c44c1a50b Mon Sep 17 00:00:00 2001 From: compudj Date: Sat, 14 Aug 2004 21:06:03 +0000 Subject: [PATCH] correct inlining of hook by id get git-svn-id: http://ltt.polymtl.ca/svn@758 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/lttv/lttv/hook.c | 11 ----------- ltt/branches/poly/lttv/lttv/hook.h | 9 ++++++++- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/ltt/branches/poly/lttv/lttv/hook.c b/ltt/branches/poly/lttv/lttv/hook.c index 45870c32..9f08b98b 100644 --- a/ltt/branches/poly/lttv/lttv/hook.c +++ b/ltt/branches/poly/lttv/lttv/hook.c @@ -416,17 +416,6 @@ unsigned lttv_hooks_by_id_max_id(LttvHooksById *h) return h->len; } - -inline LttvHooks *lttv_hooks_by_id_get(LttvHooksById *h, unsigned id) -{ - LttvHooks *ret; - if(id < h->len) ret = h->pdata[id]; - else ret = NULL; - - return ret; -} - - void lttv_hooks_by_id_remove(LttvHooksById *h, unsigned id) { if(id < h->len && h->pdata[id] != NULL) { diff --git a/ltt/branches/poly/lttv/lttv/hook.h b/ltt/branches/poly/lttv/lttv/hook.h index 193714c6..502ac5c8 100644 --- a/ltt/branches/poly/lttv/lttv/hook.h +++ b/ltt/branches/poly/lttv/lttv/hook.h @@ -144,7 +144,14 @@ unsigned lttv_hooks_by_id_max_id(LttvHooksById *h); /* Get the list of hooks for an id, NULL if none exists */ -LttvHooks *lttv_hooks_by_id_get(LttvHooksById *h, unsigned id); +inline LttvHooks *lttv_hooks_by_id_get(LttvHooksById *h, unsigned id) +{ + LttvHooks *ret; + if(id < h->len) ret = h->pdata[id]; + else ret = NULL; + + return ret; +} /* Remove the list of hooks associated with an id */ -- 2.34.1