summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCore
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2021-10-31 23:21:51 +0100
committerAndreas Kling <kling@serenityos.org>2021-11-02 22:56:53 +0100
commit2e6bb987a31179eddcd3f85f405ad9e8c1e2bc24 (patch)
treea7dee4c85edbee11d630f581337edecc63f07b2b /Userland/Libraries/LibCore
parent68c8d23e39b697ead4488f2207952c2d8fdf78d6 (diff)
downloadserenity-2e6bb987a31179eddcd3f85f405ad9e8c1e2bc24.zip
AK+WindowServer: Remove did_construct() framework used only once
There is also make_ref_counted(), which does not call did_construct(), so the method was not guaranteed to be run. Since there is only a single user, and `WindowServer::Window` is a final class anyway (so there is no need to separate the constructor and post-constructor phases), let's get rid of this concept. (The following commits reduce the opportunities to call make_ref_counted, but still.)
Diffstat (limited to 'Userland/Libraries/LibCore')
-rw-r--r--Userland/Libraries/LibCore/Object.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/Userland/Libraries/LibCore/Object.h b/Userland/Libraries/LibCore/Object.h
index 26eaaf8549..c5f83ecd9e 100644
--- a/Userland/Libraries/LibCore/Object.h
+++ b/Userland/Libraries/LibCore/Object.h
@@ -70,8 +70,6 @@ public: \
static inline NonnullRefPtr<klass> construct(Args&&... args) \
{ \
auto obj = adopt_ref(*new Klass(forward<Args>(args)...)); \
- if constexpr (requires { declval<Klass>().did_construct(); }) \
- obj->did_construct(); \
return obj; \
}