From 74ccd37745e74ec01fa16b39219768ab213dd56a Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Mon, 11 Apr 2011 08:39:15 -0300 Subject: [PATCH] Move I_P_List_adapter to sql_plist.h as it is currently being used for code other then in mdl.h. Since the adapter is generic, it is better located in sql_plist.h. --- sql/mdl.h | 15 --------------- sql/sql_plist.h | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/sql/mdl.h b/sql/mdl.h index 4a9397fe215..e0934cb732b 100644 --- a/sql/mdl.h +++ b/sql/mdl.h @@ -286,21 +286,6 @@ private: }; - -/** - Hook class which via its methods specifies which members - of T should be used for participating in MDL lists. -*/ - -template -struct I_P_List_adapter -{ - static inline T **next_ptr(T *el) { return &(el->*next); } - - static inline T ***prev_ptr(T *el) { return &(el->*prev); } -}; - - /** A pending metadata lock request. diff --git a/sql/sql_plist.h b/sql/sql_plist.h index db85266be15..4395b9e4e8b 100644 --- a/sql/sql_plist.h +++ b/sql/sql_plist.h @@ -187,6 +187,20 @@ public: }; +/** + Hook class which via its methods specifies which members + of T should be used for participating in a intrusive list. +*/ + +template +struct I_P_List_adapter +{ + static inline T **next_ptr(T *el) { return &(el->*next); } + + static inline T ***prev_ptr(T *el) { return &(el->*prev); } +}; + + /** Element counting policy class for I_P_List to be used in cases when no element counting should be done.