Changeset 11071 for code/trunk/src/libraries/core/object/ObjectListBase.h
- Timestamp:
- Jan 17, 2016, 10:29:21 PM (9 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/core/object/ObjectListBase.h
r9667 r11071 57 57 @param objectBase The object to store 58 58 */ 59 ObjectListBaseElement(Listable* object) : next_( 0), prev_(0), objectBase_(object), list_(0) {}59 ObjectListBaseElement(Listable* object) : next_(nullptr), prev_(nullptr), objectBase_(object), list_(nullptr) {} 60 60 virtual ~ObjectListBaseElement() { this->removeFromList(); } 61 61 … … 82 82 ObjectListElement(T* object) : ObjectListBaseElement(static_cast<Listable*>(object)), object_(object) {} 83 83 84 virtual void changeContext(Context* oldContext, Context* newContext) 84 virtual void changeContext(Context* oldContext, Context* newContext) override 85 85 { 86 86 // add object to new context, but only if this element belongs exactly to the old context (and not to a sub-context to avoid re-adding objects … … 104 104 { 105 105 public: 106 virtual ~ObjectListElementRemovalListener() {} 106 ObjectListElementRemovalListener() = default; 107 virtual ~ObjectListElementRemovalListener() = default; 107 108 virtual void removedElement(ObjectListBaseElement* element) = 0; 108 109 }; … … 136 137 inline ObjectListBaseElement* begin() const { return this->first_; } 137 138 /// Returns a pointer to the element after the last element in the list. Works only with Iterator. 138 inline ObjectListBaseElement* end() const { return 0; }139 inline ObjectListBaseElement* end() const { return nullptr; } 139 140 /// Returns a pointer to the last element in the list. Works only with Iterator. 140 141 inline ObjectListBaseElement* rbegin() const { return this->last_; } 141 142 /// Returns a pointer to the element in front of the first element in the list. Works only with Iterator. 142 inline ObjectListBaseElement* rend() const { return 0; }143 inline ObjectListBaseElement* rend() const { return nullptr; } 143 144 144 145 inline void registerRemovalListener(ObjectListElementRemovalListener* listener) { this->listeners_.push_back(listener); }
Note: See TracChangeset
for help on using the changeset viewer.