Commit 893d19bc authored by Davi Arnaut's avatar Davi Arnaut

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.
parent bd8a19aa
...@@ -286,21 +286,6 @@ class MDL_key ...@@ -286,21 +286,6 @@ class MDL_key
}; };
/**
Hook class which via its methods specifies which members
of T should be used for participating in MDL lists.
*/
template <typename T, T* T::*next, T** T::*prev>
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. A pending metadata lock request.
......
...@@ -187,6 +187,20 @@ class I_P_List_iterator ...@@ -187,6 +187,20 @@ class I_P_List_iterator
}; };
/**
Hook class which via its methods specifies which members
of T should be used for participating in a intrusive list.
*/
template <typename T, T* T::*next, T** T::*prev>
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 Element counting policy class for I_P_List to be used in
cases when no element counting should be done. cases when no element counting should be done.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment