diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-07-09 14:38:06 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-07-09 14:38:06 +0200 |
commit | c7cc5558558d95b021687525d94a07476aee9fd2 (patch) | |
tree | 0fa2c2b5de6c6294a082be832f5dea7ba9f1058c /include | |
parent | 7282c2250e02c3ea2da57508d885c09c9881c4f0 (diff) |
Make the name of intrusive list class configurable using a define
Diffstat (limited to 'include')
-rw-r--r-- | include/intrusive_list.h | 2 | ||||
-rw-r--r-- | include/intrusive_list_impl.h | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/include/intrusive_list.h b/include/intrusive_list.h index ae323edb8..7a127eb58 100644 --- a/include/intrusive_list.h +++ b/include/intrusive_list.h @@ -50,4 +50,6 @@ class intrusive_list_node friend class intrusive_list<T, Tag>; }; +#define INSPIRCD_INTRUSIVE_LIST_NAME intrusive_list #include "intrusive_list_impl.h" +#undef INSPIRCD_INTRUSIVE_LIST_NAME diff --git a/include/intrusive_list_impl.h b/include/intrusive_list_impl.h index 5e48442c5..41fc72a1f 100644 --- a/include/intrusive_list_impl.h +++ b/include/intrusive_list_impl.h @@ -18,7 +18,7 @@ template <typename T, typename Tag> -class intrusive_list +class INSPIRCD_INTRUSIVE_LIST_NAME { public: class iterator : public std::iterator<std::bidirectional_iterator_tag, T*> @@ -64,7 +64,7 @@ class intrusive_list typedef iterator const_iterator; - intrusive_list() + INSPIRCD_INTRUSIVE_LIST_NAME() : listhead(NULL) , listsize(0) { |