mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 10:57:35 +00:00
LibCore: Remove the Core::Objects::all_objects() list
Nobody actually used the list of all Core::Objects anyway.
This commit is contained in:
parent
405187993a
commit
26647f2b10
4 changed files with 2 additions and 13 deletions
|
@ -15,16 +15,9 @@
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
|
|
||||||
IntrusiveList<&Object::m_all_objects_list_node>& Object::all_objects()
|
|
||||||
{
|
|
||||||
static IntrusiveList<&Object::m_all_objects_list_node> objects;
|
|
||||||
return objects;
|
|
||||||
}
|
|
||||||
|
|
||||||
Object::Object(Object* parent)
|
Object::Object(Object* parent)
|
||||||
: m_parent(parent)
|
: m_parent(parent)
|
||||||
{
|
{
|
||||||
all_objects().append(*this);
|
|
||||||
if (m_parent)
|
if (m_parent)
|
||||||
m_parent->add_child(*this);
|
m_parent->add_child(*this);
|
||||||
}
|
}
|
||||||
|
@ -39,7 +32,6 @@ Object::~Object()
|
||||||
for (auto& child : children)
|
for (auto& child : children)
|
||||||
child->m_parent = nullptr;
|
child->m_parent = nullptr;
|
||||||
|
|
||||||
all_objects().remove(*this);
|
|
||||||
stop_timer();
|
stop_timer();
|
||||||
if (m_parent)
|
if (m_parent)
|
||||||
m_parent->remove_child(*this);
|
m_parent->remove_child(*this);
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
#include <AK/Forward.h>
|
#include <AK/Forward.h>
|
||||||
#include <AK/Function.h>
|
#include <AK/Function.h>
|
||||||
#include <AK/HashMap.h>
|
#include <AK/HashMap.h>
|
||||||
#include <AK/IntrusiveList.h>
|
|
||||||
#include <AK/Noncopyable.h>
|
#include <AK/Noncopyable.h>
|
||||||
#include <AK/OwnPtr.h>
|
#include <AK/OwnPtr.h>
|
||||||
#include <AK/StringView.h>
|
#include <AK/StringView.h>
|
||||||
|
@ -60,8 +59,6 @@ class Object
|
||||||
AK_MAKE_NONCOPYABLE(Object);
|
AK_MAKE_NONCOPYABLE(Object);
|
||||||
AK_MAKE_NONMOVABLE(Object);
|
AK_MAKE_NONMOVABLE(Object);
|
||||||
|
|
||||||
IntrusiveListNode<Object> m_all_objects_list_node;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~Object();
|
virtual ~Object();
|
||||||
|
|
||||||
|
@ -135,8 +132,6 @@ public:
|
||||||
|
|
||||||
void deferred_invoke(Function<void()>);
|
void deferred_invoke(Function<void()>);
|
||||||
|
|
||||||
static IntrusiveList<&Object::m_all_objects_list_node>& all_objects();
|
|
||||||
|
|
||||||
void dispatch_event(Core::Event&, Object* stay_within = nullptr);
|
void dispatch_event(Core::Event&, Object* stay_within = nullptr);
|
||||||
|
|
||||||
void remove_from_parent()
|
void remove_from_parent()
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
#include "HitTestResult.h"
|
#include "HitTestResult.h"
|
||||||
#include <AK/DeprecatedString.h>
|
#include <AK/DeprecatedString.h>
|
||||||
|
#include <AK/IntrusiveList.h>
|
||||||
#include <AK/WeakPtr.h>
|
#include <AK/WeakPtr.h>
|
||||||
#include <LibCore/Object.h>
|
#include <LibCore/Object.h>
|
||||||
#include <LibGfx/Bitmap.h>
|
#include <LibGfx/Bitmap.h>
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include <AK/CircularQueue.h>
|
#include <AK/CircularQueue.h>
|
||||||
#include <AK/DeprecatedString.h>
|
#include <AK/DeprecatedString.h>
|
||||||
#include <AK/HashMap.h>
|
#include <AK/HashMap.h>
|
||||||
|
#include <AK/IntrusiveList.h>
|
||||||
#include <AK/StackInfo.h>
|
#include <AK/StackInfo.h>
|
||||||
#include <AK/StringBuilder.h>
|
#include <AK/StringBuilder.h>
|
||||||
#include <AK/StringView.h>
|
#include <AK/StringView.h>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue