Skip to content

Commit

Permalink
Merge branch 'main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
iurienistor committed Feb 17, 2024
2 parents a7db033 + 1d20f00 commit 145b150
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/redkite/include/RkObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class RK_EXPORT RkObject {
RK_DECLARE_IMPL(RkObject);
explicit RkObject(RkObject *parent, std::unique_ptr<RkObjectImpl> impl);
void rk__add_observer(std::unique_ptr<RkObserver> observer);
const std::vector<std::unique_ptr<RkObserver>>& rk__observers() const;
const std::list<std::unique_ptr<RkObserver>>& rk__observers() const;

private:
RK_DISABLE_COPY(RkObject);
Expand Down
4 changes: 2 additions & 2 deletions src/redkite/include/impl/RkObjectImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class RkObject::RkObjectImpl {
RkEventQueue* getEventQueue() const;
void addObserver(std::unique_ptr<RkObserver> ob);
void removeObservers(RkObject *obj);
const std::vector<std::unique_ptr<RkObserver>>& observers() const;
const std::list<std::unique_ptr<RkObserver>>& observers() const;
void addBoundObject(RkObject *obj);
void removeBoundObject(RkObject *obj);
void addChild(RkObject* child);
Expand All @@ -56,7 +56,7 @@ class RkObject::RkObjectImpl {
RkObject *parentObject;
RkEventQueue *eventQueue;
std::unordered_set<RkObject*> objectChildren;
std::vector<std::unique_ptr<RkObserver>> observersList;
std::list<std::unique_ptr<RkObserver>> observersList;
std::vector<RkObject*> boundObjects;
std::string objectName;
};
Expand Down
2 changes: 1 addition & 1 deletion src/redkite/src/RkObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void RkObject::rk__add_observer(std::unique_ptr<RkObserver> observer)
o_ptr->addObserver(std::move(observer));
}

const std::vector<std::unique_ptr<RkObserver>>& RkObject::rk__observers() const
const std::list<std::unique_ptr<RkObserver>>& RkObject::rk__observers() const
{
return o_ptr->observers();
}
Expand Down
6 changes: 3 additions & 3 deletions src/redkite/src/RkObjectImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ RkObject::RkObjectImpl::~RkObjectImpl()
observersList.clear();

// Remove myself from the paren object.
if (inf_ptr->parent())
inf_ptr->parent()->removeChild(inf_ptr);
if (parent())
parent()->removeChild(inf_ptr);
}

void RkObject::RkObjectImpl::removeChildrens()
Expand Down Expand Up @@ -107,7 +107,7 @@ void RkObject::RkObjectImpl::removeObservers(RkObject *obj)
, observersList.end());
}

const std::vector<std::unique_ptr<RkObserver>>&
const std::list<std::unique_ptr<RkObserver>>&
RkObject::RkObjectImpl::observers() const
{
return observersList;
Expand Down

0 comments on commit 145b150

Please sign in to comment.