diff options
Diffstat (limited to 'source/blender/blenlib/BLI_listbase_wrapper.hh')
-rw-r--r-- | source/blender/blenlib/BLI_listbase_wrapper.hh | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/blenlib/BLI_listbase_wrapper.hh b/source/blender/blenlib/BLI_listbase_wrapper.hh index 9cf7fc5c0e0..047099eb36e 100644 --- a/source/blender/blenlib/BLI_listbase_wrapper.hh +++ b/source/blender/blenlib/BLI_listbase_wrapper.hh @@ -33,10 +33,10 @@ namespace blender { template<typename T> class ListBaseWrapper { private: - ListBase *m_listbase; + ListBase *listbase_; public: - ListBaseWrapper(ListBase *listbase) : m_listbase(listbase) + ListBaseWrapper(ListBase *listbase) : listbase_(listbase) { BLI_assert(listbase); } @@ -47,17 +47,17 @@ template<typename T> class ListBaseWrapper { class Iterator { private: - ListBase *m_listbase; - T *m_current; + ListBase *listbase_; + T *current_; public: - Iterator(ListBase *listbase, T *current) : m_listbase(listbase), m_current(current) + Iterator(ListBase *listbase, T *current) : listbase_(listbase), current_(current) { } Iterator &operator++() { - m_current = m_current->next; + current_ = current_->next; return *this; } @@ -70,28 +70,28 @@ template<typename T> class ListBaseWrapper { bool operator!=(const Iterator &iterator) const { - return m_current != iterator.m_current; + return current_ != iterator.current_; } T *operator*() const { - return m_current; + return current_; } }; Iterator begin() const { - return Iterator(m_listbase, (T *)m_listbase->first); + return Iterator(listbase_, (T *)listbase_->first); } Iterator end() const { - return Iterator(m_listbase, nullptr); + return Iterator(listbase_, nullptr); } T get(uint index) const { - void *ptr = BLI_findlink(m_listbase, index); + void *ptr = BLI_findlink(listbase_, index); BLI_assert(ptr); return (T *)ptr; } |